You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@apache.org on 2002/08/14 01:01:13 UTC
cvs commit: httpd-2.0/docs/manual/mod mod_mem_cache.xml mod_disk_cache.xml mod_cache.xml
stoddard 2002/08/13 16:01:13
Modified: docs/manual/mod mod_cache.xml
Added: docs/manual/mod mod_mem_cache.xml mod_disk_cache.xml
Log:
mod_cache doc updates.
Submitted by: Jean-Jacques Clar <jj...@novell.com>
Revision Changes Path
1.5 +83 -13 httpd-2.0/docs/manual/mod/mod_cache.xml
Index: mod_cache.xml
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/mod/mod_cache.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- mod_cache.xml 23 May 2002 14:50:11 -0000 1.4
+++ mod_cache.xml 13 Aug 2002 23:01:13 -0000 1.5
@@ -4,7 +4,7 @@
<modulesynopsis>
<name>mod_cache</name>
-<description>Content cache keyed to URIs</description>
+<description>Content cache keyed to URIs.</description>
<status>Experimental</status>
<sourcefile>mod_cache.c</sourcefile>
<identifier>cache_module</identifier>
@@ -20,17 +20,44 @@
management modules. Two storage management modules are included in
the base Apache distribution:</p>
<dl>
- <dt><em>mod_disk_cache</em></dt>
- <dd>implements a disk based storage manager for use with mod_proxy</dd>
- <dt><em>mod_mem_cache</em></dt>
+ <dt><em><module>mod_disk_cache</module></em></dt>
+ <dd>implements a disk based storage manager for use with <module>mod_proxy</module></dd>
+ <dt><em><module>mod_mem_cache</module></em></dt>
<dd>implements an in-memory based storage manager. mod_mem_cache
can be configured to operate in two modes: caching open file
- descriptors or caching objects in heap storage. <em>mod_mem_cache</em>
+ descriptors or caching objects in heap storage. <em><module>mod_mem_cache</module></em>
is most useful when used to cache locally generated content or to cache
backend server content for mod_proxy configured for ProxyPass (aka <em>reverse proxy</em>)</dd>
</dl>
<p>Content stored and retrived keyed to the URL. Content with
access protections is not cached.</p>
+
+ <related>
+ <modulelist>
+ <module>mod_disk_cache</module>
+ <module>mod_mem_cache</module>
+ </modulelist>
+ <directivelist>
+ <directive module="mod_disk_cache">CacheRoot</directive>
+ <directive module="mod_disk_cache">CacheSize</directive>
+ <directive module="mod_disk_cache">CacheGcInterval</directive>
+ <directive module="mod_disk_cache">CacheDirLevels</directive>
+ <directive module="mod_disk_cache">CacheDirLength</directive>
+ <directive module="mod_disk_cache">CacheExpiryCheck</directive>
+ <directive module="mod_disk_cache">CacheMinFileSize</directive>
+ <directive module="mod_disk_cache">CacheMaxFileSize</directive>
+ <directive module="mod_disk_cache">CacheTimeMargin</directive>
+ <directive module="mod_disk_cache">CacheGcDaily</directive>
+ <directive module="mod_disk_cache">CacheGcUnused</directive>
+ <directive module="mod_disk_cache">CacheGcClean</directive>
+ <directive module="mod_disk_cache">CacheGcMemUsage</directive>
+ <directive module="mod_mem_cache">MCacheSize</directive>
+ <directive module="mod_mem_cache">MCacheMaxObjectCount</directive>
+ <directive module="mod_mem_cache">MCacheMinObjectSize</directive>
+ <directive module="mod_mem_cache">MCacheMaxObjectSize</directive>
+ <directive module="mod_mem_cache">MCacheRemovalAlgorithm</directive>
+ </directivelist>
+ </related>
</summary>
<section><title>Sample Configuration</title>
@@ -47,7 +74,7 @@
#LoadModule disk_cache_module modules/mod_disk_cache.so <br />
<IfModule mod_disk_cache.c> <br />
CacheRoot c:/cacheroot <br />
- CacheSize
+ CacheSize 256 <br />
CacheEnable disk / <br />
CacheDirLevels 5 <br />
CacheDirLength 3 <br />
@@ -128,11 +155,13 @@
<directivesynopsis>
<name>CacheMaxExpire</name>
<description>The maximum time in seconds to cache a document</description>
-<syntax></syntax>
+<syntax>CacheMaxExpire <em>seconds</em></syntax>
+<default>CacheMaxExpire 86400 <em>(one day)</em></default>
<contextlist><context>server config</context></contextlist>
<usage>
- <p>The maximum time in seconds to cache a document.</p>
+ <p>The maximum time in seconds to cache a document. The <directive>CacheMaxExpire</directive>
+ takes precedence over the <em>Expire</em> field from the header.</p>
<example>
CacheMaxExpire 604800
</example>
@@ -140,11 +169,13 @@
</directivesynopsis>
<directivesynopsis>
<name>CacheDefaultExpire</name>
-<syntax></syntax>
+<syntax>CacheDefaultExpire <em>seconds</em></syntax>
+<default>CacheDefaultExpire 3600 <em>(one hour)</em></default>
<contextlist><context>server config</context></contextlist>
<usage>
- <p>The default time in seconds to cache a document.</p>
+ <p>The default time in seconds to cache a document if the page does not have
+ an expiry date in the <em>Expires</em> field.</p>
<example>
CacheDefaultExpire 86400
</example>
@@ -154,7 +185,7 @@
<directivesynopsis>
<name>CacheIgnoreNoLastMod</name>
<description>Ignore responses where there is no Last Modified Header</description>
-<syntax></syntax>
+<syntax>CacheIgnoreNoLastMod</syntax>
<contextlist><context>server config</context></contextlist>
<usage>
@@ -169,7 +200,7 @@
<directivesynopsis>
<name>CacheIgnoreCacheControl</name>
<description>Ignore requests from the client for uncached content</description>
-<syntax></syntax>
+<syntax>CacheIgnoreCacheControl</syntax>
<contextlist><context>server config</context></contextlist>
<usage>
@@ -184,7 +215,8 @@
<directivesynopsis>
<name>CacheLastModifiedFactor</name>
<description>The factor used to estimate the Expires date from the LastModified date</description>
-<syntax></syntax>
+<syntax>CacheLastModifiedFactor <em>float</em></syntax>
+<default>CacheLastModifiedFactor 0.1</default>
<contextlist><context>server config</context></contextlist>
<usage>
@@ -193,6 +225,44 @@
<example>
CacheLastModifiedFactor
</example>
+</usage>
+</directivesynopsis>
+
+<directivesynopsis>
+<name>CacheForceCompletion</name>
+<description>Percentage of download to arrive for the cache to force complete transfert</description>
+<syntax>CacheLastModifiedFactor <em>Percentage</em></syntax>
+<default>CacheLastModifiedFactor 60</default>
+<contextlist><context>server config</context></contextlist>
+
+<usage>
+ <p>Percentage of download to arrive for the cache to force complete transfert.</p>
+
+ <example>
+ CacheForceCompletion
+ </example>
+<note type="warning">
+This feature is currently <em>not</em> implemented.
+</note>
+ </usage>
+ </directivesynopsis>
+
+<directivesynopsis>
+<name>CacheForceCompletion</name>
+<description>Percentage of download to arrive for the cache to force complete transfert</description>
+<syntax>CacheLastModifiedFactor <em>Percentage</em></syntax>
+<default>CacheLastModifiedFactor 60</default>
+<contextlist><context>server config</context></contextlist>
+
+<usage>
+ <p>Percentage of download to arrive for the cache to force complete transfert.</p>
+
+ <example>
+ CacheForceCompletion
+ </example>
+<note type="warning">
+This feature is currently <em>not</em> implemented.
+</note>
</usage>
</directivesynopsis>
1.1 httpd-2.0/docs/manual/mod/mod_mem_cache.xml
Index: mod_mem_cache.xml
===================================================================
<?xml version="1.0"?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
<modulesynopsis>
<name>mod_mem_cache</name>
<description>Content cache keyed to URIs</description>
<status>Experimental</status>
<sourcefile>mod_mem_cache.c</sourcefile>
<identifier>mem_cache_module</identifier>
<summary>
<note type="warning">
This module is experimental. Documentation is still under development...
</note>
<p>mod_mem_cache implements an in-memory based storage manager.
mod_mem_cache can be configured to operate in two modes: caching open file
descriptors or caching objects in heap storage. <em>mod_mem_cache</em>
is most useful when used to cache locally generated content or to cache
backend server content for <module>mod_proxy</module> configured for ProxyPass
(aka <em>reverse proxy</em>)</p>
<note>
<p><module>mod_mem_cache</module> requires the services of <module>mod_cache</module>.</p>
</note>
<p>Content stored and retrived keyed to the URL. Content with
access protections is not cached.</p>
</summary>
<directivesynopsis>
<name>MCacheSize</name>
<description>The maximum amount of memory used by the cache in KBytes</description>
<syntax>MCacheSize <em>KBytes</em></syntax>
<default>MCacheSize 100</default>
<contextlist><context>server config</context></contextlist>
<usage>
<p>The <directive>MCacheSize</directive> directive sets the desired space
usage of the cache, in KBytes (1024-byte units). If a new entry needs to be
inserted in the cache and the size of the entry is greather than the
remaining size, entries will be removed until the new entry could be cached.
The removed entry is decided base on the <directive>MCacheRemovalAlgorithm</directive> algorithm</p>
<note type="warning">
The size must be greater than <directive>MCacheMaxObjectSize</directive>.
</note>
<example>
MCacheSize 700000 <br />
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>MCacheMaxObjectCount</name>
<description>The maximum number of objects allowed to be placed in the cache</description>
<syntax>MCacheMaxObjectCount <em>value</em></syntax>
<default>MCacheMaxObjectCount 1009</default>
<contextlist><context>server config</context></contextlist>
<usage>
<p>The <directive>MCacheMaxObjectCount</directive> directive sets the maximum
number of objects to be cached. If a new entry needs to be
inserted in the cache and the maximum number of objects is reached, an entry
will be removed to allow the new entry be cached. </p>
<note type="warning">
The size must be greater than <directive>MCacheMinObjectSize</directive>.
</note>
<note>
The value of <directive>MCacheMaxObjectCount</directive> is used to create
the open hash table.
</note>
<example>
MCacheMaxObjectCount 13001 <br />
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>MCacheMinObjectSize</name>
<description>The minimum size (in bytes) of an object to be placed in the cache</description>
<syntax>MCacheMinObjectSize <em>bytes</em></syntax>
<default>MCacheMinObjectSize 0</default>
<contextlist><context>server config</context></contextlist>
<usage>
<p>The <directive>MCacheMinObjectSize</directive> directive sets the minimum
size in bytes of an object to be cached.</p>
<example>
MCacheMinObjectSize 10000 <br />
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>MCacheMaxObjectSize</name>
<description>The maximum size (in bytes) of an object to be placed in the cache</description>
<syntax>MCacheMaxObjectSize <em>bytes</em></syntax>
<default>MCacheMaxObjectSize 10000</default>
<contextlist><context>server config</context></contextlist>
<usage>
<p>The <directive>MCacheMaxObjectSize</directive> directive sets the maximum
size of an object to be cached.</p>
<example>
MCacheMaxObjectSize 6400000 <br />
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>MCacheRemovalAlgorithm</name>
<description>The algorithm used to remove entries from the cache</description>
<syntax>MCacheRemovalAlgorithm <em>algorithm</em></syntax>
<default>MCacheRemovalAlgorithm GDSF</default>
<contextlist><context>server config</context></contextlist>
<usage>
<p>The <directive>MCacheRemovalAlgorithm</directive> directive sets the algorithm
used to remove entries from the cache.
Two choices are available: <br />
LRU (Least Recently Used): LRU removes the objects that have not been
accessed for the longest time.<br />
GDSF (GreadyDual-Size): This algorithm assigns priority to cached objects
based on the coast of a cache miss and the size of the object. Objects with
smallest priority are removed first.</p>
<example>
MCacheRemovalAlgorithm GDSF <br />
MCacheRemovalAlgorithm LRU <br />
</example>
</usage>
</directivesynopsis>
</modulesynopsis>
1.1 httpd-2.0/docs/manual/mod/mod_disk_cache.xml
Index: mod_disk_cache.xml
===================================================================
<?xml version="1.0"?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
<modulesynopsis>
<name>mod_disk_cache</name>
<description>Content cache keyed to URIs</description>
<status>Experimental</status>
<sourcefile>mod_disk_cache.c</sourcefile>
<identifier>disk_cache_module</identifier>
<summary>
<note type="warning">
This module is experimental. Documentation is still under development...
</note>
<p><module>mod_disk_cache</module> implements a disk based storage manager for use with <module>mod_proxy.</module></p>
<p>Content stored and retrived keyed to the URL. Content with
access protections is not cached.</p>
<note>
<p><module>mod_disk_cache</module> requires the services of <module>mod_cache</module>.</p>
</note>
</summary>
<directivesynopsis>
<name>CacheRoot</name>
<description>The directory to store cache files</description>
<syntax>CacheRoot <em>directory</em></syntax>
<default>none</default>
<contextlist><context>server config</context></contextlist>
<usage>
<p>The <directive>CacheRoot</directive> directive defines the name of the directory
on the disk to contain cache files. What is happening if not set ?</p>
<example>
CacheRoot c:/cacheroot <br />
</example>
</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 <em>KBytes</em></syntax>
<default>CacheSize 1000000</default>
<contextlist><context>server config</context></contextlist>
<usage>
<p>The <directive>MCacheSize</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>
MCacheSize 5000000 <br />
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>CacheGcInterval</name>
<description>The interval between garbage collections</description>
<syntax>CacheGcInterval <em>hours</em></syntax>
<contextlist><context>server config</context></contextlist>
<usage>
<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>
<syntax>CacheDirLevels <em>levels</em></syntax>
<default>CacheDirLevels 3</default>
<contextlist><context>server config</context></contextlist>
<usage>
<p>The <directive>CacheDirLevels</directive> directive sets the number of
subdirectory levels in the cache. Cached data will be saved this many directory
levels below <directive>CacheRoot</directive></p>
<note>
<p>CacheDirLevels*CacheDirLength value must not be higher than 20.</p>
</note>
<example>
CacheDirLevels 5 <br />
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>CacheDirLength</name>
<description>The number of characters in subdirectory names</description>
<syntax>CacheDirLength <em>length</em></syntax>
<default>CacheDirLength 2</default>
<contextlist><context>server config</context></contextlist>
<usage>
<p>The <directive>CacheDirLength</directive> directive sets the number of
characters for each subdirectory in the cache</p>
<note>
<p>CacheDirLevels*CacheDirLength value must not be higher than 20.</p>
</note>
<example>
CacheDirLength 4 <br />
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>CacheExpiryCheck</name>
<description>On if cache observes Expires date when seeking files</description>
<syntax>CacheExpiryCheck <em>binary</em></syntax>
<default>CacheExpiryCheck ?</default>
<contextlist><context>server config</context></contextlist>
<usage>
<example>
CacheExpiryCheck On<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 file to be placed in the cache</description>
<syntax>CacheMinFileSize <em>bytes</em></syntax>
<default>CacheMinFileSize 1</default>
<contextlist><context>server config</context></contextlist>
<usage>
<p>The <directive>CacheMinFileSize</directive> directive sets the minimum
size in bytes of a file to be cached.</p>
<example>
CacheMinFileSize 64<br />
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>CacheMaxFileSize</name>
<description>The maximum size (in bytes) of a file to be placed in the cache</description>
<syntax>CacheMaxFileSize <em>bytes</em></syntax>
<default>CacheMaxFileSize 1000000</default>
<contextlist><context>server config</context></contextlist>
<usage>
<p>The <directive>CacheMaxFileSize</directive> directive sets the maximum
size in bytes of a file to be cached.</p>
<example>
CacheMaxFileSize 64000<br />
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>CacheTimeMargin</name>
<description>The minimum time margin to cache a document</description>
<syntax>CacheTimeMargin <em>?</em></syntax>
<default>CacheTimeMargin ?</default>
<contextlist><context>server config</context></contextlist>
<usage>
<example>
CacheTimeMargin<br />
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>CacheGcDaily</name>
<description>The time of day for garbage collection (24 hour clock)</description>
<syntax>CacheGcDaily <em>time</em></syntax>
<default>CacheGcDaily ?</default>
<contextlist><context>server config</context></contextlist>
<usage>
<example>
CacheGcDaily<br />
</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 in hours to retain unused file that match a url</description>
<syntax>CacheGcUnused <em>hours</em></syntax>
<default>CacheGcUnused ?</default>
<contextlist><context>server config</context></contextlist>
<usage>
<example>
CacheGcUnused<br />
</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 in hours to retain unchanged files that match a url</description>
<syntax>CacheGcClean <em>hours</em></syntax>
<default>CacheGcClean ?</default>
<contextlist><context>server config</context></contextlist>
<usage>
<example>
CacheGcClean<br />
</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 <em>KBytes</em></syntax>
<default>CacheGcMemUsage ?</default>
<contextlist><context>server config</context></contextlist>
<usage>
<example>
CacheGcMemUsage<br />
</example>
<note type="warning">
The <directive>CacheGcMemUsage</directive> directive is currently <em>not</em> implemented.
</note>
</usage>
</directivesynopsis>
</modulesynopsis>