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]
{
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 */
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,
}
-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)
{
* 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"),
/* 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 */