1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
- <em> -> <var>
- markup changes
- some whitespace reformatting

content:
- fix directive contexts
- clarify the flag directives and add default values
- add short description for CacheDefaultExpire


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97418 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
André Malo
2002-11-06 02:16:51 +00:00
parent 911ad5768b
commit a94e304a8c

View File

@@ -11,23 +11,30 @@
<summary> <summary>
<note type="warning"> <note type="warning">
This module is experimental. Documentation is still under development... This module is experimental. Documentation is still under development...
</note> </note>
<p>mod_cache implements an RFC 2616 compliant HTTP content
cache that can be used to cache either local or proxied content. <p><module>mod_cache</module> implements an <a
mod_cache requires the services of one or more storage href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a> compliant HTTP
content cache that can be used to cache either local or proxied content.
<module>mod_cache</module> requires the services of one or more storage
management modules. Two storage management modules are included in management modules. Two storage management modules are included in
the base Apache distribution:</p> the base Apache distribution:</p>
<dl> <dl>
<dt><module>mod_disk_cache</module></dt> <dt><module>mod_disk_cache</module></dt>
<dd>implements a disk based storage manager for use with <module>mod_proxy</module></dd> <dd>implements a disk based storage manager for use with
<module>mod_proxy</module></dd>
<dt><module>mod_mem_cache</module></dt> <dt><module>mod_mem_cache</module></dt>
<dd>implements an in-memory based storage manager. mod_mem_cache <dd>implements an in-memory based storage manager.
can be configured to operate in two modes: caching open file <module>mod_mem_cache</module> can be configured to operate in two
descriptors or caching objects in heap storage. <em><module>mod_mem_cache</module></em> modes: caching open file descriptors or caching objects in heap storage.
is most useful when used to cache locally generated content or to cache <module>mod_mem_cache</module> is most useful when used to cache
backend server content for mod_proxy configured for ProxyPass (aka <em>reverse proxy</em>)</dd> locally generated content or to cache backend server content for
<module>mod_proxy</module> configured for <directive module="mod_proxy"
>ProxyPass</directive> (aka <dfn>reverse proxy</dfn>)</dd>
</dl> </dl>
<p>Content stored and retrived keyed to the URL. Content with <p>Content stored and retrived keyed to the URL. Content with
access protections is not cached.</p> access protections is not cached.</p>
</summary> </summary>
@@ -61,198 +68,233 @@
</related> </related>
</section> </section>
<section><title>Sample Configuration</title> <section id="sampleconf"><title>Sample Configuration</title>
<example><title>Sample httpd.conf</title> <example><title>Sample httpd.conf</title>
# <br /> #<br />
# Sample Cache Configuration <br /> # Sample Cache Configuration<br />
# <br /> #<br />
LoadModule cache_module modules/mod_cache.so <br /> LoadModule cache_module modules/mod_cache.so<br />
&lt;IfModule mod_cache.c&gt; <br /> <br />
<br /> &lt;IfModule mod_cache.c&gt;<br />
#LoadModule disk_cache_module modules/mod_disk_cache.so <br /> <indent>
&lt;IfModule mod_disk_cache.c&gt; <br /> #LoadModule disk_cache_module modules/mod_disk_cache.so<br />
CacheRoot c:/cacheroot <br /> &lt;IfModule mod_disk_cache.c&gt;<br />
CacheSize 256 <br /> <indent>
CacheEnable disk / <br /> CacheRoot c:/cacheroot<br />
CacheDirLevels 5 <br /> CacheSize 256<br />
CacheDirLength 3 <br /> CacheEnable disk /<br />
&lt;/IfModule&gt; <br /> CacheDirLevels 5<br />
<br /> CacheDirLength 3<br />
LoadModule mem_cache_module modules/mod_mem_cache.so <br /> </indent>
&lt;IfModule mod_mem_cache.c&gt; <br /> &lt;/IfModule&gt; <br />
MCacheEnable mem / <br /> <br />
MCacheSize 4096 <br /> LoadModule mem_cache_module modules/mod_mem_cache.so<br />
MCacheMaxObjectCount 100 <br /> &lt;IfModule mod_mem_cache.c&gt;<br />
MCacheMinObjectSize 1 <br /> <indent>
MCacheMaxObjectSize 2048 <br /> MCacheEnable mem /<br />
&lt;/IfModule&gt; <br /> MCacheSize 4096<br />
<br /> MCacheMaxObjectCount 100<br />
&lt;/IfModule&gt; <br /> MCacheMinObjectSize 1<br />
</example> MCacheMaxObjectSize 2048<br />
</indent>
&lt;/IfModule&gt;<br />
</indent>
&lt;/IfModule&gt;
</example>
</section> </section>
<directivesynopsis> <directivesynopsis>
<name>CacheEnable</name> <name>CacheEnable</name>
<description>Enable caching specified URLs in a specified storage manager</description> <description>Enable caching specified URLs in a specified storage
<syntax>CacheEnable <em>cache_type </em><em> url-string</em></syntax> manager</description>
<contextlist><context>server config</context></contextlist> <syntax>CacheEnable <var>cache_type</var> <var>url-string</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<usage> <usage>
<p>The <directive>CacheEnable</directive> directive instructs <p>The <directive>CacheEnable</directive> directive instructs
mod_cache to cache urls at or below <em>url-string</em>. <module>mod_cache</module> to cache urls at or below
The cache store is specified with the <em>cache_type</em> argument. <var>url-string</var>. The cache store is specified with the
<em>cache_type </em> <em> mem</em> instructs mod_cache to use the <var>cache_type</var> argument. <var>cache_type</var> <code>mem</code>
in-memory cache storage manager implemented by <em>mod_mem_cache</em>. instructs <module>mod_cache</module> to use the in-memory cache storage
<em>cache_type </em> <em> disk</em> instructs mod_cache to use the manager implemented by <module>mod_mem_cache</module>.
cache storage manager implemented by <em>mod_disk_cache </em>. </p> <var>cache_type</var> <code>disk</code> instructs
<module>mod_cache</module> to use the cache storage manager implemented
by <module>mod_disk_cache</module>.</p>
<example> <example>
CacheEnable disk / <br /> CacheEnable disk /<br />
CacheEnable mem /manual <br /> CacheEnable mem /manual<br />
CacheEnable fd /images <br /> CacheEnable fd /images<br />
</example> </example>
</usage> </usage>
</directivesynopsis> </directivesynopsis>
<directivesynopsis> <directivesynopsis>
<name>CacheDisable</name> <name>CacheDisable</name>
<description>Disable caching of specified URLs by specified storage manager</description> <description>Disable caching of specified URLs by specified storage
<syntax>CacheDisable <em>cache_type </em> <em> url-string</em></syntax> manager</description>
<contextlist><context>server config</context></contextlist> <syntax>CacheDisable <var>cache_type</var> <var>url-string</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<usage> <usage>
<p>The <directive>CacheDisable</directive> directive instructs <p>The <directive>CacheDisable</directive> directive instructs
mod_cache to <em>not</em> cache urls at or above <em>url-string</em>.</p> <module>mod_cache</module> to <em>not</em> cache urls at or below
<var>url-string</var>.</p>
<example><title>Example</title> <example><title>Example</title>
CacheDisable disk /local_files CacheDisable disk /local_files
</example> </example>
</usage> </usage>
</directivesynopsis> </directivesynopsis>
<directivesynopsis> <directivesynopsis>
<name>CacheMaxExpire</name> <name>CacheMaxExpire</name>
<description>The maximum time in seconds to cache a document</description> <description>The maximum time in seconds to cache a document</description>
<syntax>CacheMaxExpire <em>seconds</em></syntax> <syntax>CacheMaxExpire <var>seconds</var></syntax>
<default>CacheMaxExpire 86400 (one day)</default> <default>CacheMaxExpire 86400 (one day)</default>
<contextlist><context>server config</context></contextlist> <contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<usage> <usage>
<p>The maximum time in seconds to cache a document. The <directive>CacheMaxExpire</directive> <p>The maximum time in seconds to cache a document. The
takes precedence over the <em>Expire</em> field from the header.</p> <directive>CacheMaxExpire</directive> takes precedence over the
<code>Expires</code> field from the header.</p>
<example> <example>
CacheMaxExpire 604800 CacheMaxExpire 604800
</example> </example>
</usage> </usage>
</directivesynopsis> </directivesynopsis>
<directivesynopsis> <directivesynopsis>
<name>CacheDefaultExpire</name> <name>CacheDefaultExpire</name>
<syntax>CacheDefaultExpire <em>seconds</em></syntax> <description>The default time in seconds to cache a document</description>
<syntax>CacheDefaultExpire <var>seconds</var></syntax>
<default>CacheDefaultExpire 3600 (one hour)</default> <default>CacheDefaultExpire 3600 (one hour)</default>
<contextlist><context>server config</context></contextlist> <contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<usage> <usage>
<p>The default time in seconds to cache a document if the page does not have <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> an expiry date in the <code>Expires</code> field.</p>
<example> <example>
CacheDefaultExpire 86400 CacheDefaultExpire 86400
</example> </example>
</usage> </usage>
</directivesynopsis> </directivesynopsis>
<directivesynopsis> <directivesynopsis>
<name>CacheIgnoreNoLastMod</name> <name>CacheIgnoreNoLastMod</name>
<description>Ignore responses where there is no Last Modified Header</description> <description>Ignore responses where there is no Last Modified
<syntax>CacheIgnoreNoLastMod</syntax> Header</description>
<contextlist><context>server config</context></contextlist> <syntax>CacheIgnoreNoLastMod On|Off</syntax>
<default>CacheIgnoreNoLastMod Off</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<usage> <usage>
<p>Ignore responses where there is no Last Modified Header</p> <p>Ignore responses where there is no Last Modified Header.</p>
<example> <example>
CacheIgnoreNoLastMod CacheIgnoreNoLastMod On
</example> </example>
</usage> </usage>
</directivesynopsis> </directivesynopsis>
<directivesynopsis> <directivesynopsis>
<name>CacheIgnoreCacheControl</name> <name>CacheIgnoreCacheControl</name>
<description>Ignore requests from the client for uncached content</description> <description>Ignore requests from the client for uncached
<syntax>CacheIgnoreCacheControl</syntax> content</description>
<contextlist><context>server config</context></contextlist> <syntax>CacheIgnoreCacheControl On|Off</syntax>
<default>CacheIgnoreCacheControl Off</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<usage> <usage>
<p>Ignore requests from the client for uncached content</p> <p>Ignore requests from the client for uncached content</p>
<example> <example>
CacheIgnoreNoLastMod CacheIgnoreCacheControl On
</example> </example>
</usage> </usage>
</directivesynopsis> </directivesynopsis>
<directivesynopsis> <directivesynopsis>
<name>CacheLastModifiedFactor</name> <name>CacheLastModifiedFactor</name>
<description>The factor used to estimate the Expires date from the LastModified date</description> <description>The factor used to estimate the Expires date from the
<syntax>CacheLastModifiedFactor <em>float</em></syntax> LastModified date</description>
<syntax>CacheLastModifiedFactor <var>float</var></syntax>
<default>CacheLastModifiedFactor 0.1</default> <default>CacheLastModifiedFactor 0.1</default>
<contextlist><context>server config</context></contextlist> <contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<usage> <usage>
<p>The factor used to estimate the Expires date from the LastModified date.</p> <p>The factor used to estimate the Expires date from the LastModified date.</p>
<example> <example>
CacheLastModifiedFactor 0.5 CacheLastModifiedFactor 0.5
</example> </example>
</usage> </usage>
</directivesynopsis> </directivesynopsis>
<directivesynopsis> <directivesynopsis>
<name>CacheForceCompletion</name> <name>CacheForceCompletion</name>
<description>Percentage of download to arrive for the cache to force complete transfer</description> <description>Percentage of download to arrive for the cache to force
<syntax>CacheForceCompletion <em>Percentage</em></syntax> complete transfer</description>
<syntax>CacheForceCompletion <var>Percentage</var></syntax>
<default>CacheForceCompletion 60</default> <default>CacheForceCompletion 60</default>
<contextlist><context>server config</context></contextlist> <contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<usage> <usage>
<p>Percentage of download to arrive for the cache to force complete transfert.</p> <p>Percentage of download to arrive for the cache to force complete transfer.</p>
<example> <example>
CacheForceCompletion 80 CacheForceCompletion 80
</example> </example>
<note type="warning">
This feature is currently <em>not</em> implemented. <note type="warning">
</note> This feature is currently <em>not</em> implemented.
</note>
</usage> </usage>
</directivesynopsis> </directivesynopsis>
<directivesynopsis> <directivesynopsis>
<name>CacheMaxStreamingBuffer</name> <name>CacheMaxStreamingBuffer</name>
<description>Maximum amount of a streamed response to buffer in memory before declaring the response uncacheable</description> <description>Maximum amount of a streamed response to buffer in memory
<syntax>CacheMaxStreamingBuffer <em>size_in_bytes</em></syntax> before declaring the response uncacheable</description>
<syntax>CacheMaxStreamingBuffer <var>size_in_bytes</var></syntax>
<default>CacheMaxStreamingBuffer 0</default> <default>CacheMaxStreamingBuffer 0</default>
<contextlist><context>server config</context></contextlist> <contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<usage> <usage>
<p>Maximum number of bytes of a streamed response (i.e., a response where <p>Maximum number of bytes of a streamed response (<em>i.e.</em>, a
the entire content is not available all at once, such as a proxy or CGI response where the entire content is not available all at once, such
response) to buffer before deciding if the response is cacheable. By as a proxy or CGI response) to buffer before deciding if the response
default, a streamed response will <em>not</em> be cached unless it has a is cacheable. By default, a streamed response will <em>not</em> be
Content-Length header. The reason for this is to avoid using a large amount cached unless it has a <code>Content-Length</code> header. The reason
of memory to buffer a partial response that might end up being too large for this is to avoid using a large amount of memory to buffer a partial
to fit in the cache anyway. To enable caching of streamed responses, use response that might end up being too large to fit in the cache anyway.
CacheMaxStreamingBuffer to specify the maximum amount of buffer space to use To enable caching of streamed responses, use <directive
per request.</p> >CacheMaxStreamingBuffer</directive> to specify the maximum amount of
buffer space to use per request.</p>
<p>Note: Using a nonzero value for CacheMaxStreamingBuffer will not delay the <note><title>Note:</title>
transmission of the response to the client. As soon as mod_cache copies a <p>Using a nonzero value for <directive
block of streamed content into a buffer, it sends the block on to the next >CacheMaxStreamingBuffer</directive> will not delay the transmission
output filter for delivery to the client.</p> of the response to the client. As soon as <module>mod_cache</module>
copies a block of streamed content into a buffer, it sends the block
on to the next output filter for delivery to the client.</p>
</note>
<example> <example>
# Enable caching of streamed responses up to 64KB:<br /> # Enable caching of streamed responses up to 64KB:<br />
CacheMaxStreamingBuffer 65536 CacheMaxStreamingBuffer 65536
</example> </example>
</usage> </usage>
</directivesynopsis> </directivesynopsis>