From: Paul J. Reder Date: Tue, 27 Aug 2002 19:22:45 +0000 (+0000) Subject: Remove CacheOn config directive since it is set but never checked. X-Git-Tag: AGB_BEFORE_AAA_CHANGES~144 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fdbc12515d9fe9031b555c52ea81db389f9eceb9;p=apache 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] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96548 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 8257dc0f33..4d7863577c 100644 --- 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] diff --git a/modules/experimental/mod_cache.c b/modules/experimental/mod_cache.c index 3165492e0b..93704b3027 100644 --- a/modules/experimental/mod_cache.c +++ b/modules/experimental/mod_cache.c @@ -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"), diff --git a/modules/experimental/mod_cache.h b/modules/experimental/mod_cache.h index 66fae17efb..8154ad26c2 100644 --- a/modules/experimental/mod_cache.h +++ b/modules/experimental/mod_cache.h @@ -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 */