]> granicus.if.org Git - apache/commitdiff
mod_disk_cache: Remove a bunch of non-implemented garbage collection
authorJustin Erenkrantz <jerenkrantz@apache.org>
Sat, 6 Nov 2004 07:56:20 +0000 (07:56 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Sat, 6 Nov 2004 07:56:20 +0000 (07:56 +0000)
and cache size directives that are now available through htcacheclean.

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

CHANGES
docs/manual/mod/mod_disk_cache.xml
modules/experimental/mod_disk_cache.c

diff --git a/CHANGES b/CHANGES
index 03a73def8057de2a40e0bf87dac28273361091aa..21e28f62f23f1d86aa2f7fe0e3783b04cd09e89e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@ Changes with Apache 2.1.0-dev
 
   [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]
 
index abfff4c44eda8712239aba3708fa64c520832d86..3acda4525c6bdda13d5087979fef6fb248f47087 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
 
 <!--
  Copyright 2002-2004 The Apache Software Foundation
@@ -70,52 +70,6 @@ stored</description>
 </usage>
 </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
@@ -167,29 +121,6 @@ cache.</description>
 </usage>
 </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
@@ -230,118 +161,4 @@ cache</description>
 </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>
-
 </modulesynopsis>
index 20ff6892b08155b813c610d1518c1aac7825331f..67ae80d434950219fbd77d8aa3e7bfa62e95c207 100644 (file)
@@ -82,26 +82,14 @@ typedef struct disk_cache_object {
 #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 @@ static void *create_config(apr_pool_t *p, server_rec *s)
     /* 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 @@ static const char
 
     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 @@ static const char
     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 @@ static const char
     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}
 };