httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: httpd-2.0 CHANGES
Date Sat, 06 Nov 2004 07:56:20 GMT
jerenkrantz    2004/11/05 23:56:20

  Modified:    modules/experimental mod_disk_cache.c
               docs/manual/mod mod_disk_cache.xml
               .        CHANGES
  Log:
  mod_disk_cache: Remove a bunch of non-implemented garbage collection
  and cache size directives that are now available through htcacheclean.
  
  Revision  Changes    Path
  1.69      +1 -101    httpd-2.0/modules/experimental/mod_disk_cache.c
  
  Index: mod_disk_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_disk_cache.c,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -u -r1.68 -r1.69
  --- mod_disk_cache.c	4 Nov 2004 21:51:12 -0000	1.68
  +++ mod_disk_cache.c	6 Nov 2004 07:56:20 -0000	1.69
  @@ -82,26 +82,14 @@
   #define DEFAULT_DIRLENGTH 2
   #define DEFAULT_MIN_FILE_SIZE 1
   #define DEFAULT_MAX_FILE_SIZE 1000000
  -#define DEFAULT_CACHE_SIZE 1000000
   
   typedef struct {
       const char* cache_root;
       apr_size_t cache_root_len;
  -    off_t space;                 /* Maximum cache size (in 1024 bytes) */
  -    apr_time_t maxexpire;        /* Maximum time to keep cached files in msecs */
  -    apr_time_t defaultexpire;    /* default time to keep cached file in msecs */
  -    double lmfactor;             /* factor for estimating expires date */
  -    apr_time_t gcinterval;       /* garbage collection interval, in msec */
       int dirlevels;               /* Number of levels of subdirectories */
       int dirlength;               /* Length of subdirectory names */
  -    int        expirychk;               /* true if expiry time is observed for cached files
*/
       apr_size_t minfs;            /* minumum file size for cached files */
       apr_size_t maxfs;            /* maximum file size for cached files */
  -    apr_time_t mintm;            /* minimum time margin for caching files */
  -    /* dgc_time_t gcdt;            time of day for daily garbage collection */
  -    apr_array_header_t *gcclnun; /* gc_retain_t entries for unused files */
  -    apr_array_header_t *gcclean; /* gc_retain_t entries for all files */
  -    int maxgcmem;                /* maximum memory used by garbage collection */
   } disk_cache_conf;
   
   module AP_MODULE_DECLARE_DATA disk_cache_module;
  @@ -754,10 +742,8 @@
       /* XXX: Set default values */
       conf->dirlevels = DEFAULT_DIRLEVELS;
       conf->dirlength = DEFAULT_DIRLENGTH;
  -    conf->space = DEFAULT_CACHE_SIZE;
       conf->maxfs = DEFAULT_MAX_FILE_SIZE;
       conf->minfs = DEFAULT_MIN_FILE_SIZE;
  -    conf->expirychk = 1;
   
       conf->cache_root = NULL;
       conf->cache_root_len = 0;
  @@ -779,24 +765,7 @@
   
       return NULL;
   }
  -static const char
  -*set_cache_size(cmd_parms *parms, void *in_struct_ptr, const char *arg)
  -{
  -    disk_cache_conf *conf = ap_get_module_config(parms->server->module_config,
  -                                                 &disk_cache_module);
  -    conf->space = atoi(arg);
  -    return NULL;
  -}
  -static const char
  -*set_cache_gcint(cmd_parms *parms, void *in_struct_ptr, const char *arg)
  -{
  -/*
  -    disk_cache_conf *conf = ap_get_module_config(parms->server->module_config,
  -                                                 &disk_cache_module);
  -*/
  -    /* XXX */
  -    return NULL;
  -}
  +
   /*
    * Consider eliminating the next two directives in favor of
    * Ian's prime number hash...
  @@ -830,15 +799,7 @@
       conf->dirlength = val;
       return NULL;
   }
  -static const char
  -*set_cache_exchk(cmd_parms *parms, void *in_struct_ptr, int flag)
  -{
  -    disk_cache_conf *conf = ap_get_module_config(parms->server->module_config,
  -                                                 &disk_cache_module);
  -    conf->expirychk = flag;
   
  -    return NULL;
  -}
   static const char
   *set_cache_minfs(cmd_parms *parms, void *in_struct_ptr, const char *arg)
   {
  @@ -855,80 +816,19 @@
       conf->maxfs = atoi(arg);
       return NULL;
   }
  -static const char
  -*set_cache_minetm(cmd_parms *parms, void *in_struct_ptr, const char *arg)
  -{
  -    /* XXX
  -    disk_cache_conf *conf = ap_get_module_config(parms->server->module_config,
  -                                                 &disk_cache_module);
  -    */
  -    return NULL;
  -}
  -static const char
  -*set_cache_gctime(cmd_parms *parms, void *in_struct_ptr, const char *arg)
  -{
  -    /* XXX
  -    disk_cache_conf *conf = ap_get_module_config(parms->server->module_config,
  -                                                 &disk_cache_module);
  -    */
  -    return NULL;
  -}
  -static const char
  -*add_cache_gcclean(cmd_parms *parms, void *in_struct_ptr, const char *arg, const char *arg1)
  -{
  -    /* XXX
  -    disk_cache_conf *conf = ap_get_module_config(parms->server->module_config,
  -                                                 &disk_cache_module);
  -    */
  -    return NULL;
  -}
  -static const char
  -*add_cache_gcclnun(cmd_parms *parms, void *in_struct_ptr, const char *arg, const char *arg1)
  -{
  -    /* XXX
  -    disk_cache_conf *conf = ap_get_module_config(parms->server->module_config,
  -                                                 &disk_cache_module);
  -    */
  -    return NULL;
  -}
  -static const char
  -*set_cache_maxgcmem(cmd_parms *parms, void *in_struct_ptr, const char *arg)
  -{
  -    /* XXX
  -    disk_cache_conf *conf = ap_get_module_config(parms->server->module_config,
  -                                                 &disk_cache_module);
  -    */
  -    return NULL;
  -}
   
   static const command_rec disk_cache_cmds[] =
   {
       AP_INIT_TAKE1("CacheRoot", set_cache_root, NULL, RSRC_CONF,
                    "The directory to store cache files"),
  -    AP_INIT_TAKE1("CacheSize", set_cache_size, NULL, RSRC_CONF,
  -                  "The maximum disk space used by the cache in KB"),
  -    AP_INIT_TAKE1("CacheGcInterval", set_cache_gcint, NULL, RSRC_CONF,
  -                  "The interval between garbage collections, in hours"),
       AP_INIT_TAKE1("CacheDirLevels", set_cache_dirlevels, NULL, RSRC_CONF,
                     "The number of levels of subdirectories in the cache"),
       AP_INIT_TAKE1("CacheDirLength", set_cache_dirlength, NULL, RSRC_CONF,
                     "The number of characters in subdirectory names"),
  -    AP_INIT_FLAG("CacheExpiryCheck", set_cache_exchk, NULL, RSRC_CONF,
  -                 "on if cache observes Expires date when seeking files"),
       AP_INIT_TAKE1("CacheMinFileSize", set_cache_minfs, NULL, RSRC_CONF,
                     "The minimum file size to cache a document"),
       AP_INIT_TAKE1("CacheMaxFileSize", set_cache_maxfs, NULL, RSRC_CONF,
                     "The maximum file size to cache a document"),
  -    AP_INIT_TAKE1("CacheTimeMargin", set_cache_minetm, NULL, RSRC_CONF,
  -                  "The minimum time margin to cache a document"),
  -    AP_INIT_TAKE1("CacheGcDaily", set_cache_gctime, NULL, RSRC_CONF,
  -                  "The time of day for garbage collection (24 hour clock)"),
  -    AP_INIT_TAKE2("CacheGcUnused", add_cache_gcclnun, NULL, RSRC_CONF,
  -                  "The time in hours to retain unused file that match a url"),
  -    AP_INIT_TAKE2("CacheGcClean", add_cache_gcclean, NULL, RSRC_CONF,
  -                  "The time in hours to retain unchanged files that match a url"),
  -    AP_INIT_TAKE1("CacheGcMemUsage", set_cache_maxgcmem, NULL, RSRC_CONF,
  -                  "The maximum kilobytes of memory used for garbage collection"),
       {NULL}
   };
   
  
  
  
  1.11      +1 -184    httpd-2.0/docs/manual/mod/mod_disk_cache.xml
  
  Index: mod_disk_cache.xml
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/mod/mod_disk_cache.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -u -r1.10 -r1.11
  --- mod_disk_cache.xml	17 Apr 2004 10:49:22 -0000	1.10
  +++ mod_disk_cache.xml	6 Nov 2004 07:56:20 -0000	1.11
  @@ -71,52 +71,6 @@
   </directivesynopsis>
   
   <directivesynopsis>
  -<name>CacheSize</name>
  -<description>The maximum amount of disk space that will be used by the
  -cache in KBytes</description>
  -<syntax>CacheSize <var>KBytes</var></syntax>
  -<default>CacheSize 1000000</default>
  -<contextlist><context>server config</context><context>virtual host</context>
  -</contextlist>
  -
  -<usage>
  -    <p>The <directive>CacheSize</directive> directive sets the desired
  -    disk space usage of the cache, in KBytes (1024-byte units). This
  -    directive does not put a  hard limit on the size of the cache. The
  -    garbage collector will delete files until the usage is at or below the
  -    settings. Always use a value that is lower than the available disk
  -    space.</p>
  -
  -    <example>
  -      CacheSize  5000000
  -    </example>
  -</usage>
  -</directivesynopsis>
  -
  -<directivesynopsis>
  -<name>CacheGcInterval</name>
  -<description>The interval between garbage collection attempts.</description>
  -<syntax>CacheGcInterval <var>hours</var></syntax>
  -<contextlist><context>server config</context><context>virtual host</context>
  -</contextlist>
  -
  -<usage>
  -    <p>The <directive>CacheGcInterval</directive> directive specifies
the
  -    number of hours to wait between attempts to free up disk space.</p>
  -    <p>More detail will be added here, when the function is implemented.</p>
  -
  -    <example>
  -      CacheGcInterval  24<br />
  -    </example>
  -
  -    <note type="warning">
  -      The <directive>CacheGcInterval</directive> directive is currently
  -      <em>not</em> implemented.
  -    </note>
  -</usage>
  -</directivesynopsis>
  -
  -<directivesynopsis>
   <name>CacheDirLevels</name>
   <description>The number of levels of subdirectories in the
   cache.</description>
  @@ -168,29 +122,6 @@
   </directivesynopsis>
   
   <directivesynopsis>
  -<name>CacheExpiryCheck</name>
  -<description>Indicates if the cache observes Expires dates when seeking
  -files</description>
  -<syntax>CacheExpiryCheck On|Off</syntax>
  -<default>CacheExpiryCheck On</default>
  -<contextlist><context>server config</context><context>virtual host</context>
  -</contextlist>
  -
  -<usage>
  -    <p>More detail will be added here, when the function is implemented.</p>
  -
  -    <example>
  -      CacheExpiryCheck Off<br />
  -    </example>
  -
  -    <note type="warning">
  -      The <directive>CacheExpiryCheck</directive> directive is currently
  -      <em>not</em> implemented.
  -    </note>
  -</usage>
  -</directivesynopsis>
  -
  -<directivesynopsis>
   <name>CacheMinFileSize</name>
   <description>The minimum size (in bytes) of a document to be placed in the
   cache</description>
  @@ -227,120 +158,6 @@
       <example>
         CacheMaxFileSize 64000
       </example>
  -</usage>
  -</directivesynopsis>
  -
  -<directivesynopsis>
  -<name>CacheTimeMargin</name>
  -<description>The minimum time margin to cache a document</description>
  -<syntax>CacheTimeMargin <var>?</var></syntax>
  -<default>CacheTimeMargin ?</default>
  -<contextlist><context>server config</context><context>virtual host</context>
  -</contextlist>
  -
  -<usage>
  -    <p>More detail will be added here, when the function is implemented.</p>
  -
  -    <example>
  -      CacheTimeMargin X
  -    </example>
  -
  -    <note type="warning">
  -      The <directive>CacheTimeMargin</directive> directive is currently
  -      <em>not</em> implemented.
  -    </note>
  -</usage>
  -</directivesynopsis>
  -
  -<directivesynopsis>
  -<name>CacheGcDaily</name>
  -<description>The recurring time each day for garbage collection to be run.
  -(24 hour clock)</description>
  -<syntax>CacheGcDaily <var>time</var></syntax>
  -<default>CacheGcDaily ?</default>
  -<contextlist><context>server config</context><context>virtual host</context>
  -</contextlist>
  -
  -<usage>
  -    <p>More detail will be added here, when the function is implemented.</p>
  -
  -    <example>
  -      CacheGcDaily 23:59
  -    </example>
  -
  -    <note type="warning">
  -      The <directive>CacheGcDaily</directive> directive is currently
  -      <em>not</em> implemented.
  -    </note>
  -</usage>
  -</directivesynopsis>
  -
  -<directivesynopsis>
  -<name>CacheGcUnused</name>
  -<description>The time to retain unreferenced cached files that match a
  -URL.</description>
  -<syntax>CacheGcUnused <var>hours</var> <var>url-string</var></syntax>
  -<default>CacheGcUnused ?</default>
  -<contextlist><context>server config</context><context>virtual host</context>
  -</contextlist>
  -
  -<usage>
  -    <p>More detail will be added here, when the function is implemented.</p>
  -
  -    <example>
  -      CacheGcUnused 12 /local_images
  -    </example>
  -
  -    <note type="warning">
  -      The <directive>CacheGcUnused</directive> directive is currently
  -      <em>not</em> implemented.
  -    </note>
  -</usage>
  -</directivesynopsis>
  -
  -<directivesynopsis>
  -<name>CacheGcClean</name>
  -<description>The time to retain unchanged cached files that match a
  -URL</description>
  -<syntax>CacheGcClean <var>hours</var> <var>url-string</var></syntax>
  -<default>CacheGcClean ?</default>
  -<contextlist><context>server config</context><context>virtual host</context>
  -</contextlist>
  -
  -<usage>
  -    <p>More detail will be added here, when the function is implemented.</p>
  -
  -    <example>
  -      CacheGcClean 12 /daily_scripts
  -    </example>
  -
  -    <note type="warning">
  -      The <directive>CacheGcClean</directive> directive is currently
  -      <em>not</em> implemented.
  -    </note>
  -</usage>
  -</directivesynopsis>
  -
  -<directivesynopsis>
  -<name>CacheGcMemUsage</name>
  -<description>The maximum kilobytes of memory used for garbage
  -collection</description>
  -<syntax>CacheGcMemUsage <var>KBytes</var></syntax>
  -<default>CacheGcMemUsage ?</default>
  -<contextlist><context>server config</context><context>virtual host</context>
  -</contextlist>
  -
  -<usage>
  -    <p>More detail will be added here, when the function is implemented.</p>
  -
  -    <example>
  -      CacheGcMemUsage 16
  -    </example>
  -
  -    <note type="warning">
  -      The <directive>CacheGcMemUsage</directive> directive is currently
  -      <em>not</em> implemented.
  -    </note>
   </usage>
   </directivesynopsis>
   
  
  
  
  1.1629    +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1628
  retrieving revision 1.1629
  diff -u -u -r1.1628 -r1.1629
  --- CHANGES	6 Nov 2004 07:45:21 -0000	1.1628
  +++ CHANGES	6 Nov 2004 07:56:20 -0000	1.1629
  @@ -2,6 +2,10 @@
   
     [Remove entries to the current 2.0 section below, when backported]
   
  +  *) mod_disk_cache: Remove a bunch of non-implemented garbage collection
  +     and cache size directives that are now available through htcacheclean.
  +     [Justin Erenkrantz]
  +
     *) Add htcacheclean to support/ for assistance with mod_disk_cache.
        [Andreas Steinmetz]
   
  
  
  

Mime
View raw message