home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / apache_2.2.8-win32-x86-no_ssl.msi / Data1.cab / _035E6871091B9E6FE832C6EB25A3CB63 < prev    next >
Extensible Markup Language  |  2007-11-12  |  32KB  |  490 lines

  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
  4.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  5.               This file is generated from xml source: DO NOT EDIT
  6.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  7.       -->
  8. <title>mod_cache - Apache HTTP Server</title>
  9. <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
  10. <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
  11. <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
  12. <link href="../images/favicon.ico" rel="shortcut icon" /></head>
  13. <body>
  14. <div id="page-header">
  15. <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
  16. <p class="apache">Apache HTTP Server Version 2.2</p>
  17. <img alt="" src="../images/feather.gif" /></div>
  18. <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
  19. <div id="path">
  20. <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.2</a> > <a href="./">Modules</a></div>
  21. <div id="page-content">
  22. <div id="preamble"><h1>Apache Module mod_cache</h1>
  23. <div class="toplang">
  24. <p><span>Available Languages: </span><a href="../en/mod/mod_cache.html" title="English"> en </a> |
  25. <a href="../ja/mod/mod_cache.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
  26. <a href="../ko/mod/mod_cache.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
  27. </div>
  28. <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Content cache keyed to URIs.</td></tr>
  29. <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  30. <tr><th><a href="module-dict.html#ModuleIdentifier">ModuleáIdentifier:</a></th><td>cache_module</td></tr>
  31. <tr><th><a href="module-dict.html#SourceFile">SourceáFile:</a></th><td>mod_cache.c</td></tr></table>
  32. <h3>Summary</h3>
  33.  
  34.     <div class="warning">This module should be used with care and
  35.     can be used to circumvent <code class="directive"><a href="../mod/mod_authz_host.html#allow">Allow</a></code> and <code class="directive"><a href="../mod/mod_authz_host.html#deny">Deny</a></code> directives. You 
  36.     should not enable caching for any content to which you wish
  37.     to limit access by client host name, address or environment
  38.     variable.</div>  
  39.  
  40.     <p><code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code> implements an <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a> compliant HTTP
  41.     content cache that can be used to cache either local or proxied content.
  42.     <code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code> requires the services of one or more storage
  43.     management modules. Two storage management modules are included in
  44.     the base Apache distribution:</p>
  45.     <dl>
  46.     <dt><code class="module"><a href="../mod/mod_disk_cache.html">mod_disk_cache</a></code></dt>
  47.     <dd>implements a disk based storage manager.</dd>
  48.  
  49.     <dt><code class="module"><a href="../mod/mod_mem_cache.html">mod_mem_cache</a></code></dt>
  50.     <dd>implements a memory based storage manager. 
  51.     <code class="module"><a href="../mod/mod_mem_cache.html">mod_mem_cache</a></code> can be configured to operate in two
  52.     modes: caching open file descriptors or caching objects in heap storage.
  53.     <code class="module"><a href="../mod/mod_mem_cache.html">mod_mem_cache</a></code> can be used to cache locally generated content
  54.     or to cache backend server content for <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> when
  55.     configured using <code class="directive"><a href="../mod/mod_proxy.html#proxypass">ProxyPass</a></code>
  56.     (aka <dfn>reverse proxy</dfn>)</dd>
  57.     </dl>
  58.  
  59.     <p>Content is stored in and retrieved from the cache using URI based keys. Content with
  60.     access protection is not cached.</p>
  61.     <p>Further details, discussion, and examples, are provided in the
  62.     <a href="../caching.html">Caching Guide</a>.</p>
  63. </div>
  64. <div id="quickview"><h3 class="directives">Directives</h3>
  65. <ul id="toc">
  66. <li><img alt="" src="../images/down.gif" /> <a href="#cachedefaultexpire">CacheDefaultExpire</a></li>
  67. <li><img alt="" src="../images/down.gif" /> <a href="#cachedisable">CacheDisable</a></li>
  68. <li><img alt="" src="../images/down.gif" /> <a href="#cacheenable">CacheEnable</a></li>
  69. <li><img alt="" src="../images/down.gif" /> <a href="#cacheignorecachecontrol">CacheIgnoreCacheControl</a></li>
  70. <li><img alt="" src="../images/down.gif" /> <a href="#cacheignoreheaders">CacheIgnoreHeaders</a></li>
  71. <li><img alt="" src="../images/down.gif" /> <a href="#cacheignorenolastmod">CacheIgnoreNoLastMod</a></li>
  72. <li><img alt="" src="../images/down.gif" /> <a href="#cacheignorequerystring">CacheIgnoreQueryString</a></li>
  73. <li><img alt="" src="../images/down.gif" /> <a href="#cachelastmodifiedfactor">CacheLastModifiedFactor</a></li>
  74. <li><img alt="" src="../images/down.gif" /> <a href="#cachemaxexpire">CacheMaxExpire</a></li>
  75. <li><img alt="" src="../images/down.gif" /> <a href="#cachestorenostore">CacheStoreNoStore</a></li>
  76. <li><img alt="" src="../images/down.gif" /> <a href="#cachestoreprivate">CacheStorePrivate</a></li>
  77. </ul>
  78. <h3>Topics</h3>
  79. <ul id="topics">
  80. <li><img alt="" src="../images/down.gif" /> <a href="#related">Related Modules and Directives</a></li>
  81. <li><img alt="" src="../images/down.gif" /> <a href="#sampleconf">Sample Configuration</a></li>
  82. </ul><h3>See also</h3>
  83. <ul class="seealso">
  84. <li><a href="../caching.html">Caching Guide</a></li>
  85. </ul></div>
  86. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  87. <div class="section">
  88. <h2><a name="related" id="related">Related Modules and Directives</a></h2>
  89.     <table class="related"><tr><th>Related Modules</th><th>Related Directives</th></tr><tr><td><ul><li><code class="module"><a href="../mod/mod_disk_cache.html">mod_disk_cache</a></code></li><li><code class="module"><a href="../mod/mod_mem_cache.html">mod_mem_cache</a></code></li></ul></td><td><ul><li><code class="directive"><a href="../mod/mod_disk_cache.html#cacheroot">CacheRoot</a></code></li><li><code class="directive"><a href="../mod/mod_disk_cache.html#cachedirlevels">CacheDirLevels</a></code></li><li><code class="directive"><a href="../mod/mod_disk_cache.html#cachedirlength">CacheDirLength</a></code></li><li><code class="directive"><a href="../mod/mod_disk_cache.html#cacheminfilesize">CacheMinFileSize</a></code></li><li><code class="directive"><a href="../mod/mod_disk_cache.html#cachemaxfilesize">CacheMaxFileSize</a></code></li><li><code class="directive"><a href="../mod/mod_mem_cache.html#mcachesize">MCacheSize</a></code></li><li><code class="directive"><a href="../mod/mod_mem_cache.html#mcachemaxobjectcount">MCacheMaxObjectCount</a></code></li><li><code class="directive"><a href="../mod/mod_mem_cache.html#mcacheminobjectsize">MCacheMinObjectSize</a></code></li><li><code class="directive"><a href="../mod/mod_mem_cache.html#mcachemaxobjectsize">MCacheMaxObjectSize</a></code></li><li><code class="directive"><a href="../mod/mod_mem_cache.html#mcacheremovalalgorithm">MCacheRemovalAlgorithm</a></code></li><li><code class="directive"><a href="../mod/mod_mem_cache.html#mcachemaxstreamingbuffer">MCacheMaxStreamingBuffer</a></code></li></ul></td></tr></table>
  90. </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  91. <div class="section">
  92. <h2><a name="sampleconf" id="sampleconf">Sample Configuration</a></h2>
  93.     <div class="example"><h3>Sample httpd.conf</h3><p><code>
  94.       #<br />
  95.       # Sample Cache Configuration<br />
  96.       #<br />
  97.       LoadModule cache_module modules/mod_cache.so<br />
  98.       <br />
  99.       <IfModule mod_cache.c><br />
  100.       <span class="indent">
  101.         #LoadModule disk_cache_module modules/mod_disk_cache.so<br />
  102.         # If you want to use mod_disk_cache instead of mod_mem_cache,<br />
  103.         # uncomment the line above and comment out the LoadModule line below.<br />
  104.         <IfModule mod_disk_cache.c><br />
  105.         <span class="indent">
  106.           CacheRoot c:/cacheroot<br />
  107.           CacheEnable disk  /<br />
  108.           CacheDirLevels 5<br />
  109.           CacheDirLength 3<br />
  110.         </span>
  111.         </IfModule> <br />
  112.         <br />
  113.         LoadModule mem_cache_module modules/mod_mem_cache.so<br />
  114.         <IfModule mod_mem_cache.c><br />
  115.         <span class="indent">
  116.           CacheEnable mem  /<br />
  117.           MCacheSize 4096<br />
  118.           MCacheMaxObjectCount 100<br />
  119.           MCacheMinObjectSize 1<br />
  120.           MCacheMaxObjectSize 2048<br />
  121.         </span>
  122.         </IfModule><br />
  123.         <br />
  124.         # When acting as a proxy, don't cache the list of security updates<br />
  125.         CacheDisable http://security.update.server/update-list/<br />
  126.       </span>
  127.       </IfModule>
  128.     </code></p></div>
  129. </div>
  130. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  131. <div class="directive-section"><h2><a name="CacheDefaultExpire" id="CacheDefaultExpire">CacheDefaultExpire</a> <a name="cachedefaultexpire" id="cachedefaultexpire">Directive</a></h2>
  132. <table class="directive">
  133. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The default duration to cache a document when no expiry date is specified.</td></tr>
  134. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheDefaultExpire <var>seconds</var></code></td></tr>
  135. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheDefaultExpire 3600 (one hour)</code></td></tr>
  136. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  137. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  138. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_cache</td></tr>
  139. </table>
  140.     <p>The <code class="directive">CacheDefaultExpire</code> directive specifies a default time,
  141.     in seconds, to cache a document if neither an expiry date nor last-modified date are provided
  142.     with the document. The value specified with the <code class="directive">CacheMaxExpire</code>
  143.     directive does <em>not</em> override this setting.</p>
  144.  
  145.     <div class="example"><p><code>
  146.       CacheDefaultExpire 86400
  147.     </code></p></div>
  148.  
  149. </div>
  150. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  151. <div class="directive-section"><h2><a name="CacheDisable" id="CacheDisable">CacheDisable</a> <a name="cachedisable" id="cachedisable">Directive</a></h2>
  152. <table class="directive">
  153. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Disable caching of specified URLs</td></tr>
  154. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheDisable <var> url-string</var></code></td></tr>
  155. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  156. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  157. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_cache</td></tr>
  158. </table>
  159.     <p>The <code class="directive">CacheDisable</code> directive instructs
  160.     <code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code> to <em>not</em> cache urls at or below
  161.     <var>url-string</var>.</p>
  162.  
  163.     <div class="example"><h3>Example</h3><p><code>
  164.       CacheDisable /local_files
  165.     </code></p></div>
  166.  
  167. </div>
  168. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  169. <div class="directive-section"><h2><a name="CacheEnable" id="CacheEnable">CacheEnable</a> <a name="cacheenable" id="cacheenable">Directive</a></h2>
  170. <table class="directive">
  171. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enable caching of specified URLs using a specified storage
  172. manager</td></tr>
  173. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheEnable <var>cache_type</var> <var>url-string</var></code></td></tr>
  174. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  175. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  176. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_cache</td></tr>
  177. </table>
  178.     <p>The <code class="directive">CacheEnable</code> directive instructs
  179.     <code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code> to cache urls at or below
  180.     <var>url-string</var>. The cache storage manager is specified with the
  181.     <var>cache_type</var> argument. <var>cache_type</var> <code> mem</code>
  182.     instructs <code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code> to use the memory based storage
  183.     manager implemented by <code class="module"><a href="../mod/mod_mem_cache.html">mod_mem_cache</a></code>. 
  184.     <var>cache_type</var> <code>disk</code> instructs
  185.     <code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code> to use the disk based storage manager
  186.     implemented by <code class="module"><a href="../mod/mod_disk_cache.html">mod_disk_cache</a></code>.
  187.     <var>cache_type</var> <code>fd</code> instructs
  188.     <code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code> to use the file descriptor cache implemented
  189.     by <code class="module"><a href="../mod/mod_mem_cache.html">mod_mem_cache</a></code>.</p>
  190.     <p>In the event that the URL space overlaps between different
  191.     <code class="directive">CacheEnable</code> directives (as in the example below),
  192.     each possible storage manager will be run until the first one that
  193.     actually processes the request. The order in which the storage managers are
  194.     run is determined by the order of the <code class="directive">CacheEnable</code>
  195.     directives in the configuration file.</p>
  196.  
  197.     <div class="example"><p><code>
  198.       CacheEnable  mem   /manual<br />
  199.       CacheEnable  fd    /images<br />
  200.       CacheEnable  disk  /<br />
  201.     </code></p></div>
  202.  
  203.     <p>When acting as a forward proxy server, <var>url-string</var> can
  204.     also be used to specify remote sites and proxy protocols which 
  205.     caching should be enabled for.</p>
  206.  
  207.     <div class="example"><p><code>
  208.       # Cache proxied url's<br />
  209.       CacheEnable  disk  /<br /><br />
  210.       # Cache FTP-proxied url's<br />
  211.       CacheEnable  disk  ftp://<br /><br />
  212.       # Cache content from www.apache.org<br />
  213.       CacheEnable  disk  http://www.apache.org/<br />
  214.     </code></p></div>
  215.  
  216.  
  217. </div>
  218. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  219. <div class="directive-section"><h2><a name="CacheIgnoreCacheControl" id="CacheIgnoreCacheControl">CacheIgnoreCacheControl</a> <a name="cacheignorecachecontrol" id="cacheignorecachecontrol">Directive</a></h2>
  220. <table class="directive">
  221. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Ignore request to not serve cached content to client</td></tr>
  222. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheIgnoreCacheControl On|Off</code></td></tr>
  223. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheIgnoreCacheControl Off</code></td></tr>
  224. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  225. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  226. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_cache</td></tr>
  227. </table>
  228.     <p>Ordinarily, requests containing a Cache-Control: no-cache or
  229.     Pragma: no-cache header value will not be served from the cache.  The
  230.     <code class="directive">CacheIgnoreCacheControl</code> directive allows this
  231.     behavior to be overridden.  <code class="directive">CacheIgnoreCacheControl</code>
  232.     On tells the server to attempt to serve the resource from the cache even
  233.     if the request contains no-cache header values.  Resources requiring
  234.     authorization will <em>never</em> be cached.</p>
  235.  
  236.     <div class="example"><p><code>
  237.       CacheIgnoreCacheControl On
  238.     </code></p></div>
  239.  
  240.     <div class="warning"><h3>Warning:</h3>
  241.        This directive will allow serving from the cache even if the client has
  242.        requested that the document not be served from the cache.  This might
  243.        result in stale content being served.
  244.     </div>
  245.  
  246. <h3>See also</h3>
  247. <ul>
  248. <li><code class="directive"><a href="#cachestoreprivate">CacheStorePrivate</a></code></li>
  249. <li><code class="directive"><a href="#cachestorenostore">CacheStoreNoStore</a></code></li>
  250. </ul>
  251. </div>
  252. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  253. <div class="directive-section"><h2><a name="CacheIgnoreHeaders" id="CacheIgnoreHeaders">CacheIgnoreHeaders</a> <a name="cacheignoreheaders" id="cacheignoreheaders">Directive</a></h2>
  254. <table class="directive">
  255. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Do not store the given HTTP header(s) in the cache.
  256. </td></tr>
  257. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheIgnoreHeaders <var>header-string</var> [<var>header-string</var>] ...</code></td></tr>
  258. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheIgnoreHeaders None</code></td></tr>
  259. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  260. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  261. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_cache</td></tr>
  262. </table>
  263.     <p>According to RFC 2616, hop-by-hop HTTP headers are not stored in
  264.     the cache.  The following HTTP headers are hop-by-hop headers and thus
  265.     do not get stored in the cache in <em>any</em> case regardless of the
  266.     setting of <code class="directive">CacheIgnoreHeaders</code>:</p>
  267.  
  268.     <ul>
  269.       <li><code>Connection</code></li>
  270.       <li><code>Keep-Alive</code></li>
  271.       <li><code>Proxy-Authenticate</code></li>
  272.       <li><code>Proxy-Authorization</code></li>
  273.       <li><code>TE</code></li>
  274.       <li><code>Trailers</code></li>
  275.       <li><code>Transfer-Encoding</code></li>
  276.       <li><code>Upgrade</code></li>
  277.     </ul>
  278.  
  279.     <p><code class="directive">CacheIgnoreHeaders</code> specifies additional HTTP
  280.     headers that should not to be stored in the cache.  For example, it makes
  281.     sense in some cases to prevent cookies from being stored in the cache.</p>
  282.  
  283.     <p><code class="directive">CacheIgnoreHeaders</code> takes a space separated list
  284.     of HTTP headers that should not be stored in the cache. If only hop-by-hop
  285.     headers not should be stored in the cache (the RFC 2616 compliant
  286.     behaviour), <code class="directive">CacheIgnoreHeaders</code> can be set to
  287.     <code>None</code>.</p>
  288.  
  289.     <div class="example"><h3>Example 1</h3><p><code>
  290.       CacheIgnoreHeaders Set-Cookie
  291.     </code></p></div>
  292.  
  293.     <div class="example"><h3>Example 2</h3><p><code>
  294.       CacheIgnoreHeaders None
  295.     </code></p></div>
  296.  
  297.     <div class="warning"><h3>Warning:</h3>
  298.       If headers like <code>Expires</code> which are needed for proper cache
  299.       management are not stored due to a
  300.       <code class="directive">CacheIgnoreHeaders</code> setting, the behaviour of
  301.       mod_cache is undefined.
  302.     </div>
  303.  
  304. </div>
  305. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  306. <div class="directive-section"><h2><a name="CacheIgnoreNoLastMod" id="CacheIgnoreNoLastMod">CacheIgnoreNoLastMod</a> <a name="cacheignorenolastmod" id="cacheignorenolastmod">Directive</a></h2>
  307. <table class="directive">
  308. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Ignore the fact that a response has no Last Modified
  309. header.</td></tr>
  310. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheIgnoreNoLastMod On|Off</code></td></tr>
  311. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheIgnoreNoLastMod Off</code></td></tr>
  312. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  313. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  314. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_cache</td></tr>
  315. </table>
  316.     <p>Ordinarily, documents without a last-modified date are not cached.
  317.     Under some circumstances the last-modified date is removed (during
  318.     <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> processing for example) or not provided
  319.     at all. The <code class="directive">CacheIgnoreNoLastMod</code> directive
  320.     provides a way to specify that documents without last-modified dates
  321.     should be considered for caching, even without a last-modified date.
  322.     If neither a last-modified date nor an expiry date are provided with
  323.     the document then the value specified by the
  324.     <code class="directive">CacheDefaultExpire</code> directive will be used to
  325.     generate an expiration date.</p>
  326.  
  327.     <div class="example"><p><code>
  328.       CacheIgnoreNoLastMod On
  329.     </code></p></div>
  330.  
  331. </div>
  332. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  333. <div class="directive-section"><h2><a name="CacheIgnoreQueryString" id="CacheIgnoreQueryString">CacheIgnoreQueryString</a> <a name="cacheignorequerystring" id="cacheignorequerystring">Directive</a></h2>
  334. <table class="directive">
  335. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Ignore query string when caching</td></tr>
  336. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheIgnoreQueryString On|Off</code></td></tr>
  337. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheIgnoreQueryString Off</code></td></tr>
  338. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  339. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  340. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_cache</td></tr>
  341. <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.2.6 and later</td></tr>
  342. </table>
  343.     <p>Ordinarily, requests with query string parameters are cached separately
  344.     for each unique query string. This is according to RFC 2616/13.9 done only
  345.     if an expiration time is specified. The 
  346.     <code class="directive">CacheIgnoreQueryString</code> directive tells the cache to
  347.     cache requests even if no expiration time is specified, and to reply with 
  348.     a cached reply even if the query string differs. From a caching point of
  349.     view the request is treated as if having no query string when this 
  350.     directive is enabled.</p>
  351.  
  352.     <div class="example"><p><code>
  353.       CacheIgnoreQueryString On
  354.     </code></p></div>
  355.  
  356.  
  357. </div>
  358. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  359. <div class="directive-section"><h2><a name="CacheLastModifiedFactor" id="CacheLastModifiedFactor">CacheLastModifiedFactor</a> <a name="cachelastmodifiedfactor" id="cachelastmodifiedfactor">Directive</a></h2>
  360. <table class="directive">
  361. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The factor used to compute an expiry date based on the
  362. LastModified date.</td></tr>
  363. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheLastModifiedFactor <var>float</var></code></td></tr>
  364. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheLastModifiedFactor 0.1</code></td></tr>
  365. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  366. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  367. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_cache</td></tr>
  368. </table>
  369.     <p>In the event that a document does not provide an expiry date but does
  370.     provide a last-modified date, an expiry date can be calculated based on
  371.     the time since the document was last modified. The
  372.     <code class="directive">CacheLastModifiedFactor</code> directive specifies a
  373.     <var>factor</var> to be used in the generation of this expiry date
  374.     according to the following formula:
  375.  
  376.     <code>expiry-period = time-since-last-modified-date * <var>factor</var>
  377.     expiry-date = current-date + expiry-period</code>
  378.  
  379.     For example, if the document was last modified 10 hours ago, and
  380.     <var>factor</var> is 0.1 then the expiry-period will be set to
  381.     10*0.1 = 1 hour. If the current time was 3:00pm then the computed
  382.     expiry-date would be 3:00pm + 1hour = 4:00pm.
  383.  
  384.     If the expiry-period would be longer than that set by
  385.     <code class="directive">CacheMaxExpire</code>, then the latter takes
  386.     precedence.</p>
  387.  
  388.     <div class="example"><p><code>
  389.       CacheLastModifiedFactor 0.5
  390.     </code></p></div>
  391.  
  392. </div>
  393. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  394. <div class="directive-section"><h2><a name="CacheMaxExpire" id="CacheMaxExpire">CacheMaxExpire</a> <a name="cachemaxexpire" id="cachemaxexpire">Directive</a></h2>
  395. <table class="directive">
  396. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The maximum time in seconds to cache a document</td></tr>
  397. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheMaxExpire <var>seconds</var></code></td></tr>
  398. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheMaxExpire 86400 (one day)</code></td></tr>
  399. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  400. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  401. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_cache</td></tr>
  402. </table>
  403.     <p>The <code class="directive">CacheMaxExpire</code> directive specifies the maximum number of
  404.     seconds for which cachable HTTP documents will be retained without checking the origin
  405.     server. Thus, documents will be out of date at most this number of seconds. This maximum
  406.     value is enforced even if an expiry date was supplied with the document.</p>
  407.  
  408.     <div class="example"><p><code>
  409.       CacheMaxExpire 604800
  410.     </code></p></div>
  411.  
  412. </div>
  413. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  414. <div class="directive-section"><h2><a name="CacheStoreNoStore" id="CacheStoreNoStore">CacheStoreNoStore</a> <a name="cachestorenostore" id="cachestorenostore">Directive</a></h2>
  415. <table class="directive">
  416. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Attempt to cache requests or responses that have been marked as no-store.</td></tr>
  417. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheStoreNoStore On|Off</code></td></tr>
  418. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheStoreNoStore Off</code></td></tr>
  419. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  420. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  421. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_cache</td></tr>
  422. </table>
  423.     <p>Ordinarily, requests or responses with Cache-Control: no-store header
  424.        values will not be stored in the cache.  The
  425.        <code class="directive">CacheStoreNoCache</code> directive allows this
  426.        behavior to be overridden.  <code class="directive">CacheStoreNoCache</code> On
  427.        tells the server to attempt to cache the resource even if it contains
  428.        no-store header values.  Resources requiring authorization will
  429.        <em>never</em> be cached.</p>
  430.  
  431.     <div class="example"><p><code>
  432.       CacheStoreNoStore On
  433.     </code></p></div>
  434.  
  435.     <div class="warning"><h3>Warning:</h3>
  436.        As described in RFC 2616, the no-store directive is intended to
  437.        "prevent the inadvertent release or retention of sensitive information
  438.        (for example, on backup tapes)."  Enabling this option could store
  439.        sensitive information in the cache.  You are hereby warned.
  440.     </div>
  441.  
  442. <h3>See also</h3>
  443. <ul>
  444. <li><code class="directive"><a href="#cacheignorecachecontrol">CacheIgnoreCacheControl</a></code></li>
  445. <li><code class="directive"><a href="#cachestoreprivate">CacheStorePrivate</a></code></li>
  446. </ul>
  447. </div>
  448. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  449. <div class="directive-section"><h2><a name="CacheStorePrivate" id="CacheStorePrivate">CacheStorePrivate</a> <a name="cachestoreprivate" id="cachestoreprivate">Directive</a></h2>
  450. <table class="directive">
  451. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Attempt to cache responses that the server has marked as private</td></tr>
  452. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheStorePrivate On|Off</code></td></tr>
  453. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheStorePrivate Off</code></td></tr>
  454. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  455. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  456. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_cache</td></tr>
  457. </table>
  458.     <p>Ordinarily, responses with Cache-Control: private header values will not
  459.        be stored in the cache.  The <code class="directive">CacheStorePrivate</code>
  460.        directive allows this behavior to be overridden.
  461.        <code class="directive">CacheStorePrivate</code> On
  462.        tells the server to attempt to cache the resource even if it contains
  463.        private header values.  Resources requiring authorization will
  464.        <em>never</em> be cached.</p>
  465.  
  466.     <div class="example"><p><code>
  467.       CacheStorePrivate On
  468.     </code></p></div>
  469.  
  470.     <div class="warning"><h3>Warning:</h3>
  471.        This directive will allow caching even if the upstream server has
  472.        requested that the resource not be cached.  This directive is only
  473.        ideal for a 'private' cache.
  474.     </div>
  475.  
  476. <h3>See also</h3>
  477. <ul>
  478. <li><code class="directive"><a href="#cacheignorecachecontrol">CacheIgnoreCacheControl</a></code></li>
  479. <li><code class="directive"><a href="#cachestorenostore">CacheStoreNoStore</a></code></li>
  480. </ul>
  481. </div>
  482. </div>
  483. <div class="bottomlang">
  484. <p><span>Available Languages: </span><a href="../en/mod/mod_cache.html" title="English"> en </a> |
  485. <a href="../ja/mod/mod_cache.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
  486. <a href="../ko/mod/mod_cache.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
  487. </div><div id="footer">
  488. <p class="apache">Copyright 2007 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
  489. <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
  490. </body></html>