]> granicus.if.org Git - apache/commitdiff
Remove CacheOn config directive since it is set but never checked.
authorPaul J. Reder <rederpj@apache.org>
Tue, 27 Aug 2002 19:22:45 +0000 (19:22 +0000)
committerPaul J. Reder <rederpj@apache.org>
Tue, 27 Aug 2002 19:22:45 +0000 (19:22 +0000)
No sense wasting cycles on unused code. Besides, the only truly
bug free code is deleted code. :)   [Paul J. Reder]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96548 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/experimental/mod_cache.c
modules/experimental/mod_cache.h

diff --git a/CHANGES b/CHANGES
index 8257dc0f3300959556a80eed15e119f9fc5f29b1..4d7863577cbff8cb38939ee27098de2a00ef4096 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
 Changes with Apache 2.0.41
 
+  *) Remove CacheOn config directive since it is set but never checked.
+     No sense wasting cycles on unused code. Besides, the only truly
+     bug free code is deleted code. :)   [Paul J. Reder]
+
   *) BufferLogs are now run-time enabled, and the log_config now has 2 new
      callbacks to allow a 3rd party module to actually do the writing of the
      log file [Ian Holsman]
index 3165492e0bf9092d0b1fd350f8ec7510d8a9570e..93704b3027141f861e83471ceb7679cd639c70b4 100644 (file)
@@ -752,9 +752,6 @@ static void * create_cache_config(apr_pool_t *p, server_rec *s)
 {
     cache_server_conf *ps = apr_pcalloc(p, sizeof(cache_server_conf));
 
-    /* 1 if the cache is enabled, 0 otherwise */
-    ps->cacheon = 0;
-    ps->cacheon_set = 0;
     /* array of URL prefixes for which caching is enabled */
     ps->cacheenable = apr_array_make(p, 10, sizeof(struct cache_enable));
     /* array of URL prefixes for which caching is disabled */
@@ -784,9 +781,6 @@ static void * merge_cache_config(apr_pool_t *p, void *basev, void *overridesv)
     cache_server_conf *base = (cache_server_conf *) basev;
     cache_server_conf *overrides = (cache_server_conf *) overridesv;
 
-    /* 1 if the cache is enabled, 0 otherwise */
-    ps->cacheon = 
-        (overrides->cacheon_set == 0) ? base->cacheon : overrides->cacheon;
     /* array of URL prefixes for which caching is disabled */
     ps->cachedisable = apr_array_append(p, 
                                         base->cachedisable, 
@@ -831,17 +825,6 @@ static const char *set_cache_ignore_no_last_mod(cmd_parms *parms, void *dummy,
 
 }
 
-static const char *set_cache_on(cmd_parms *parms, void *dummy, int flag)
-{
-    cache_server_conf *conf;
-
-    conf =
-        (cache_server_conf *)ap_get_module_config(parms->server->module_config,
-                                                  &cache_module);
-    conf->cacheon = 1;
-    conf->cacheon_set = 1;
-    return NULL;
-}
 static const char *set_cache_ignore_cachecontrol(cmd_parms *parms,
                                                  void *dummy, int flag)
 {
@@ -968,8 +951,6 @@ static const command_rec cache_cmds[] =
      * This is more intuitive that requiring a LoadModule directive.
      */
 
-    AP_INIT_FLAG("CacheOn", set_cache_on, NULL, RSRC_CONF,
-                 "On if the transparent cache should be enabled"),
     AP_INIT_TAKE2("CacheEnable", add_cache_enable, NULL, RSRC_CONF,
                   "A cache type and partial URL prefix below which "
                   "caching is enabled"),
index 66fae17efb82ea8e8eacecddf09908489793df3b..8154ad26c27e878228f75dfc9f124da1d23c8043 100644 (file)
@@ -163,8 +163,6 @@ struct cache_disable {
 
 /* static information about the local cache */
 typedef struct {
-    int cacheon;                       /* Cache enabled? */
-    int cacheon_set;
     apr_array_header_t *cacheenable;   /* URLs to cache */
     apr_array_header_t *cachedisable;  /* URLs not to cache */
     apr_time_t maxex;                  /* Maximum time to keep cached files in msecs */