mod_cache.xml revision 3ec4de296cf8eb31d8a59811b58720efafccf109
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<?xml version="1.0"?>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<?xml-stylesheet type="text/xsl" href="/style/manual.xsl"?>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<modulesynopsis>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<name>mod_cache</name>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<description>Content cache keyed to URIs</description>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<status>Experimental</status>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<sourcefile>mod_cache.c</sourcefile>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<identifier>cache_module</identifier>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<summary>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<note type="warning">
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddardThis module is experimental. Documentation is still under development...
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</note>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard <p>mod_cache implements an RFC 2616 compliant HTTP content
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard cache that can be used to cache either local or proxied content.
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard mod_cache requires the services of one or more storage
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard management modules. Two storage management modules are included in
3e5f26422e7931e8838f3c844adc4282ef269cdfstoddard the base Apache distribution:</p>
3ec4de296cf8eb31d8a59811b58720efafccf109patrikj <dl>
3ec4de296cf8eb31d8a59811b58720efafccf109patrikj <dt><em>mod_disk_cache</em></dt>
3ec4de296cf8eb31d8a59811b58720efafccf109patrikj <dd>implements a disk based storage manager for use with mod_proxy</dd>
3ec4de296cf8eb31d8a59811b58720efafccf109patrikj <dt><em>mod_mem_cache</em></dt>
3ec4de296cf8eb31d8a59811b58720efafccf109patrikj <dd>implements an in-memory based storage manager. mod_mem_cache
3e5f26422e7931e8838f3c844adc4282ef269cdfstoddard can be configured to operate in two modes: caching open file
3e5f26422e7931e8838f3c844adc4282ef269cdfstoddard descriptors or caching objects in heap storage. <em>mod_mem_cache</em>
3e5f26422e7931e8838f3c844adc4282ef269cdfstoddard is most useful when used to cache locally generated content or to cache
3ec4de296cf8eb31d8a59811b58720efafccf109patrikj backend server content for mod_proxy configured for ProxyPass (aka <em>reverse proxy</em>)</dd>
3ec4de296cf8eb31d8a59811b58720efafccf109patrikj </dl>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard <p>Content stored and retrived keyed to the URL. Content with
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard access protections is not cached.</p>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</summary>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<section><title>Sample Configuration</title>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<example><title>Sample httpd.conf</title>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard# <br />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard# Sample Cache Configuration <br />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard# <br />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddardLoadModule cache_module modules/mod_cache.so <br />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard&lt;IfModule mod_cache.c&gt;<br />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard CacheOn On<br />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<p />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard #LoadModule disk_cache_module modules/mod_disk_cache.so <br />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard &lt;IfModule mod_disk_cache.c&gt; <br />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard CacheRoot c:/cacheroot <br />
3e5f26422e7931e8838f3c844adc4282ef269cdfstoddard CacheSize
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard CacheEnable disk / <br />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard CacheDirLevels 5 <br />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard CacheDirLength 3 <br />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard &lt;/IfModule&gt; <br />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<p />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard LoadModule mem_cache_module modules/mod_mem_cache.so <br />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard &lt;IfModule mod_mem_cache.c&gt; <br />
3e5f26422e7931e8838f3c844adc4282ef269cdfstoddard MCacheEnable mem / <br />
3e5f26422e7931e8838f3c844adc4282ef269cdfstoddard MCacheSize 4096 <br />
3e5f26422e7931e8838f3c844adc4282ef269cdfstoddard MCacheMaxObjectCount 100 <br />
3e5f26422e7931e8838f3c844adc4282ef269cdfstoddard MCacheMinObjectSize 1 <br />
3e5f26422e7931e8838f3c844adc4282ef269cdfstoddard MCacheMaxObjectSize 2048 <br />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard &lt;/IfModule&gt; <br />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<p />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard&lt;/IfModule&gt; <br />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</example>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</section>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<directivesynopsis>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<name>CacheOn</name>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<description></description>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<syntax>CacheOn</syntax>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<contextlist><context>server config</context></contextlist>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<usage>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard <p>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard </p>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<example>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard CacheOn
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</example>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</usage>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</directivesynopsis>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<directivesynopsis>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<name>CacheEnable</name>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<description>Enable caching specified URLs in a specified storage manager</description>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<syntax>CacheEnable <em>cache_type </em><em> url-string</em></syntax>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<contextlist><context>server config</context></contextlist>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<usage>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard <p>The <directive>CacheEnable</directive> directive instructs
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard mod_cache to cache urls at or below <em>url-string</em>.
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard The cache store is specified with the <em>cache_type</em> argument.
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard <em>cache_type </em> <em> mem</em> instructs mod_cache to use the
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard in-memory cache storage manager implemented by <em>mod_mem_cache</em>.
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard <em>cache_type </em> <em> disk</em> instructs mod_cache to use the
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard cache storage manager implemented by <em>mod_disk_cache </em>. </p>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<example>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard CacheEnable disk / <br />
3e5f26422e7931e8838f3c844adc4282ef269cdfstoddard CacheEnable mem /manual <br />
3e5f26422e7931e8838f3c844adc4282ef269cdfstoddard CacheEnable fd /images <br />
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</example>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</usage>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</directivesynopsis>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<directivesynopsis>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<name>CacheDisable</name>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<description>Disable caching of specified URLs by specified storage manager</description>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<syntax>CacheDisable <em>cache_type </em> <em> url-string</em></syntax>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<contextlist><context>server config</context></contextlist>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<usage>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard <p>The <directive>CacheDisable</directive> directive instructs
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard mod_cache to <em>not</em> cache urls at or above <em>url-string</em>.</p>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<example><title>Example</title>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard CacheDisable disk /local_files
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</example>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</usage>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</directivesynopsis>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<directivesynopsis>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<name>CacheMaxExpire</name>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<description>The maximum time in seconds to cache a document</description>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<syntax></syntax>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<contextlist><context>server config</context></contextlist>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<usage>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard <p>The maximum time in seconds to cache a document.</p>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard <example>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard CacheMaxExpire 604800
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard </example>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</usage>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</directivesynopsis>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<directivesynopsis>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<name>CacheDefaultExpire</name>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<syntax></syntax>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<contextlist><context>server config</context></contextlist>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<usage>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard <p>The default time in seconds to cache a document.</p>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard <example>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard CacheDefaultExpire 86400
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard </example>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</usage>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</directivesynopsis>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<directivesynopsis>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<name>CacheIgnoreNoLastMod</name>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<description>Ignore responses where there is no Last Modified Header</description>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<syntax></syntax>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<contextlist><context>server config</context></contextlist>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<usage>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard <p>Ignore responses where there is no Last Modified Header</p>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard <example>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard CacheIgnoreNoLastMod
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard </example>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</usage>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</directivesynopsis>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<directivesynopsis>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<name>CacheIgnoreCacheControl</name>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<description>Ignore requests from the client for uncached content</description>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<syntax></syntax>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<contextlist><context>server config</context></contextlist>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<usage>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard <p>Ignore requests from the client for uncached content</p>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard <example>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard CacheIgnoreNoLastMod
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard </example>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</usage>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</directivesynopsis>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<directivesynopsis>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<name>CacheLastModifiedFactor</name>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<description>The factor used to estimate the Expires date from the LastModified date</description>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<syntax></syntax>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<contextlist><context>server config</context></contextlist>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard<usage>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard <p>The factor used to estimate the Expires date from the LastModified date.</p>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard <example>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard CacheLastModifiedFactor
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard </example>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</usage>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</directivesynopsis>
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard
721fdd19e2abef2e8dc46eb5c022ef14efe3367estoddard</modulesynopsis>