]> granicus.if.org Git - apache/blobdiff - docs/manual/mod/mod_cache.xml
Merge in APR[-util] macros from branches/trunk-buildconf-noapr
[apache] / docs / manual / mod / mod_cache.xml
index bb5946ca76bd3d969b493bc1021d44dcba2a0298..4c91c35110d5dcab01b66739cb9e8e22c272060f 100644 (file)
     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>
@@ -162,7 +162,7 @@ LoadModule cache_module modules/mod_cache.so
         CacheDirLevels 5
         CacheDirLength 3
     &lt;/IfModule&gt;
-    
+
     # When acting as a proxy, don't cache the list of security updates
     CacheDisable http://security.update.server/update-list/
 &lt;/IfModule&gt;
@@ -246,14 +246,14 @@ LoadModule cache_module modules/mod_cache.so
   <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
@@ -327,10 +327,10 @@ AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html
   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,
@@ -344,8 +344,10 @@ CustomLog invalidated-requests.log common env=cache-invalidate
 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
@@ -372,30 +374,29 @@ manager</description>
     <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
-&lt;Location /foo&gt;
+&lt;Location "/foo"&gt;
     CacheEnable disk
 &lt;/Location&gt;
 
 # Cache regex (normal handler only)
 CacheQuickHandler off
-&lt;LocationMatch foo$&gt;
+&lt;LocationMatch "foo$"&gt;
     CacheEnable disk
 &lt;/LocationMatch&gt;
 
-# 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>
 
@@ -443,7 +444,7 @@ CacheEnable  disk  http://.example.org/
 
     <example><title>Example</title>
     <highlight language="config">
-&lt;Location /foo&gt;
+&lt;Location "/foo"&gt;
     CacheDisable on
 &lt;/Location&gt;
       </highlight>
@@ -469,7 +470,7 @@ CacheEnable  disk  http://.example.org/
 
 <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>
 
@@ -492,7 +493,7 @@ CacheEnable  disk  http://.example.org/
 
 <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>
 
 
@@ -569,8 +570,7 @@ header.</description>
     <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
@@ -723,10 +723,10 @@ LastModified date.</description>
       <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
@@ -791,8 +791,7 @@ LastModified date.</description>
        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
@@ -825,8 +824,7 @@ LastModified date.</description>
        <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
@@ -879,7 +877,7 @@ CacheLock 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>
@@ -926,7 +924,7 @@ CacheLock on
     <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
@@ -966,8 +964,8 @@ AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html
   <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">&lt;Directory&gt;</directive>
-  or <directive module="core">&lt;Location&gt;</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>
 
@@ -1015,8 +1013,8 @@ CacheHeader on
   used by the service and client.</p>
 
   <p>If the normal handler is used, this directive may appear within a
-  <directive module="core">&lt;Directory&gt;</directive> or
-  <directive module="core">&lt;Location&gt;</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>