HTTP header with a 111 response code.</p>
<p><module>mod_cache</module> requires the services of one or more
- storage management modules. One storage management module is included in
+ storage management modules. The following storage management modules are included in
the base Apache distribution:</p>
<dl>
<dt><module>mod_cache_disk</module></dt>
CacheDirLevels 5
CacheDirLength 3
</IfModule>
-
+
# When acting as a proxy, don't cache the list of security updates
CacheDisable http://security.update.server/update-list/
</IfModule>
<p>While this mode offers the best performance, the administrator may find that
under certain circumstances they may want to perform further processing on the
request after the request is cached, such as to inject personalisation into the
- cached page, or to apply authorisation restrictions to the content. Under these
+ cached page, or to apply authorization restrictions to the content. Under these
circumstances, an administrator is often forced to place independent reverse
proxy servers either behind or in front of the caching server to achieve this.</p>
<p>To solve this problem the <directive module="mod_cache">CacheQuickHandler
</directive> directive can be set to <strong>off</strong>, and the server will
process all phases normally handled by a non-cached request, including the
- <strong>authentication and authorisation</strong> phases.</p>
+ <strong>authentication and authorization</strong> phases.</p>
<p>In addition, the administrator may optionally specify the <strong>precise point
within the filter chain</strong> where caching is to take place by adding the
as per the following example:</p>
<highlight language="config">
-CustomLog cached-requests.log common env=cache-hit
-CustomLog uncached-requests.log common env=cache-miss
-CustomLog revalidated-requests.log common env=cache-revalidate
-CustomLog invalidated-requests.log common env=cache-invalidate
+CustomLog "cached-requests.log" common env=cache-hit
+CustomLog "uncached-requests.log" common env=cache-miss
+CustomLog "revalidated-requests.log" common env=cache-revalidate
+CustomLog "invalidated-requests.log" common env=cache-invalidate
</highlight>
<p>For module authors, a hook called <var>cache_status</var> is available,
manager</description>
<syntax>CacheEnable <var>cache_type</var> [<var>url-string</var>]</syntax>
<contextlist><context>server config</context><context>virtual host</context>
-<context>directory</context><context>.htaccess</context>
+<context>directory</context>
</contextlist>
+<compatibility>A url-string of '/' applied to forward proxy content in 2.2 and
+ earlier.</compatibility>
<usage>
<p>The <directive>CacheEnable</directive> directive instructs
<directive type="section">LocationMatch</directive> sections are processed
before globally defined <directive>CacheEnable</directive> directives.</p>
- <p>When acting as a forward proxy server, <var>url-string</var> can
- also be used to specify remote sites and proxy protocols which
- caching should be enabled for.</p>
+ <p>When acting as a forward proxy server, <var>url-string</var> must
+ minimally begin with a protocol for which caching should be enabled.</p>
<highlight language="config">
# Cache content (normal handler only)
CacheQuickHandler off
-<Location /foo>
+<Location "/foo">
CacheEnable disk
</Location>
# Cache regex (normal handler only)
CacheQuickHandler off
-<LocationMatch foo$>
+<LocationMatch "foo$">
CacheEnable disk
</LocationMatch>
-# Cache proxied url's (normal or quick handler)
+# Cache all but forward proxy url's (normal or quick handler)
CacheEnable disk /
# Cache FTP-proxied url's (normal or quick handler)
CacheEnable disk ftp://
-# Cache content from www.example.org (normal or quick handler)
+# Cache forward proxy content from www.example.org (normal or quick handler)
CacheEnable disk http://www.example.org/
</highlight>
<example><title>Example</title>
<highlight language="config">
-<Location /foo>
+<Location "/foo">
CacheDisable on
</Location>
</highlight>
<usage>
<p>The <directive>CacheMaxExpire</directive> directive specifies the maximum number of
- seconds for which cachable HTTP documents will be retained without checking the origin
+ seconds for which cacheable HTTP documents will be retained without checking the origin
server. Thus, documents will be out of date at most this number of seconds. This maximum
value is enforced even if an expiry date was supplied with the document.</p>
<usage>
<p>The <directive>CacheMinExpire</directive> directive specifies the minimum number of
- seconds for which cachable HTTP documents will be retained without checking the origin
+ seconds for which cacheable HTTP documents will be retained without checking the origin
server. This is only used if no valid expire time was supplied with the document.</p>
<directive>CacheIgnoreCacheControl</directive> directive allows this
behavior to be overridden. <directive>CacheIgnoreCacheControl On</directive>
tells the server to attempt to serve the resource from the cache even
- if the request contains no-cache header values. Resources requiring
- authorization will <em>never</em> be cached.</p>
+ if the request contains no-cache header values.</p>
<highlight language="config">
CacheIgnoreCacheControl On
<li><code>/someapplication/image.gif;jsessionid=123456789</code></li>
<li><code>/someapplication/image.gif?PHPSESSIONID=12345678</code></li>
</ul>
- <p>This causes cachable resources to be stored separately for each session, which
+ <p>This causes cacheable resources to be stored separately for each session, which
is often not desired. <directive>CacheIgnoreURLSessionIdentifiers</directive> lets
define a list of identifiers that are removed from the key that is used to identify
- an entity in the cache, such that cachable resources are not stored separately for
+ an entity in the cache, such that cacheable resources are not stored separately for
each session.
</p>
<p><code>CacheIgnoreURLSessionIdentifiers None</code> clears the list of ignored
directive allows this behavior to be overridden.
<directive>CacheStorePrivate</directive> On
tells the server to attempt to cache the resource even if it contains
- private header values. Resources requiring authorization will
- <em>never</em> be cached.</p>
+ private header values.</p>
<highlight language="config">
CacheStorePrivate On
<directive>CacheStoreNoStore</directive> directive allows this
behavior to be overridden. <directive>CacheStoreNoStore</directive> On
tells the server to attempt to cache the resource even if it contains
- no-store header values. Resources requiring authorization will
- <em>never</em> be cached.</p>
+ no-store header values.</p>
<highlight language="config">
CacheStoreNoStore On
<usage>
<p>The <directive>CacheLockPath</directive> directive allows you to specify the
directory in which the locks are created. If <var>directory</var> is not an absolute
- path, the location specified will be relative to the value of
+ path, the location specified will be relative to the value of
<directive module="core">DefaultRuntimeDir</directive>.</p>
</usage>
</directivesynopsis>
<p>When disabled, the cache operates as a normal handler, and is subject to
the full set of phases when handling a server request. While this mode is
slower than the default, it allows the cache to be used in cases where full
- processing is required, such as when content is subject to authorisation.</p>
+ processing is required, such as when content is subject to authorization.</p>
<highlight language="config">
# Run cache as a normal handler
<p>When the <directive module="mod_cache">CacheHeader</directive> directive
is switched on, an <strong>X-Cache</strong> header will be added to the response
with the cache status of this response. If the normal handler is used, this
- directive may appear within a <directive module="core"><Directory></directive>
- or <directive module="core"><Location></directive> directive. If the quick
+ directive may appear within a <directive type="section" module="core">Directory</directive>
+ or <directive type="section" module="core">Location</directive> directive. If the quick
handler is used, this directive must appear within a server or virtual host
context, otherwise the setting will be ignored.</p>
used by the service and client.</p>
<p>If the normal handler is used, this directive may appear within a
- <directive module="core"><Directory></directive> or
- <directive module="core"><Location></directive> directive. If the quick handler
+ <directive type="section" module="core">Directory</directive> or
+ <directive type="section" module="core">Location</directive> directive. If the quick handler
is used, this directive must appear within a server or virtual host context, otherwise
the setting will be ignored.</p>