You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by re...@apache.org on 2002/08/27 21:22:45 UTC

cvs commit: httpd-2.0/modules/experimental mod_cache.c mod_cache.h

rederpj     2002/08/27 12:22:45

  Modified:    .        CHANGES
               modules/experimental mod_cache.c mod_cache.h
  Log:
  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]
  
  Revision  Changes    Path
  1.901     +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.900
  retrieving revision 1.901
  diff -u -r1.900 -r1.901
  --- CHANGES	26 Aug 2002 23:23:44 -0000	1.900
  +++ CHANGES	27 Aug 2002 19:22:45 -0000	1.901
  @@ -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]
  
  
  
  1.54      +0 -19     httpd-2.0/modules/experimental/mod_cache.c
  
  Index: mod_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_cache.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- mod_cache.c	23 Aug 2002 16:59:24 -0000	1.53
  +++ mod_cache.c	27 Aug 2002 19:22:45 -0000	1.54
  @@ -752,9 +752,6 @@
   {
       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 @@
       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_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 @@
        * 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"),
  
  
  
  1.31      +0 -2      httpd-2.0/modules/experimental/mod_cache.h
  
  Index: mod_cache.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_cache.h,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- mod_cache.h	3 Aug 2002 22:39:42 -0000	1.30
  +++ mod_cache.h	27 Aug 2002 19:22:45 -0000	1.31
  @@ -163,8 +163,6 @@
   
   /* 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 */