github.com/krum110487/go-htaccess@v0.0.0-20240316004156-60641c8e7598/tests/data/apache_2_2_34/manual/mod/mod_disk_cache.html.en (about)

     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  <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
     5  <!--
     6          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     7                This file is generated from xml source: DO NOT EDIT
     8          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     9        -->
    10  <title>mod_disk_cache - Apache HTTP Server Version 2.2</title>
    11  <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
    12  <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
    13  <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
    14  <script src="../style/scripts/prettify.min.js" type="text/javascript">
    15  </script>
    16  
    17  <link href="../images/favicon.ico" rel="shortcut icon" /><link href="http://httpd.apache.org/docs/current/mod/mod_disk_cache.html" rel="canonical" /></head>
    18  <body>
    19  <div id="page-header">
    20  <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
    21  <p class="apache">Apache HTTP Server Version 2.2</p>
    22  <img alt="" src="../images/feather.gif" /></div>
    23  <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
    24  <div id="path">
    25  <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.2</a> &gt; <a href="./">Modules</a></div>
    26  <div id="page-content">
    27  <div class="retired"><h4>Please note</h4>
    28              <p> This document refers to a legacy release (<strong>2.2</strong>) of Apache httpd. The active release (<strong>2.4</strong>) is documented <a href="http://httpd.apache.org/docs/current">here</a>. If you have not already upgraded, please follow <a href="http://httpd.apache.org/docs/current/upgrading.html">this link</a> for more information.</p>
    29          <p>You may follow <a href="http://httpd.apache.org/docs/current/mod/mod_disk_cache.html">this link</a> to go to the current version of this document.</p></div><div id="preamble"><h1>Apache Module mod_disk_cache</h1>
    30  <div class="toplang">
    31  <p><span>Available Languages: </span><a href="../en/mod/mod_disk_cache.html" title="English">&nbsp;en&nbsp;</a> |
    32  <a href="../ja/mod/mod_disk_cache.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
    33  <a href="../ko/mod/mod_disk_cache.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
    34  </div>
    35  <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Content cache storage manager keyed to URIs</td></tr>
    36  <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
    37  <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>disk_cache_module</td></tr>
    38  <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_disk_cache.c</td></tr></table>
    39  <h3>Summary</h3>
    40  
    41      <p><code class="module"><a href="../mod/mod_disk_cache.html">mod_disk_cache</a></code> implements a disk based storage
    42      manager. It is primarily of use in conjunction with
    43      <code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code>.</p>
    44  
    45      <p>Content is stored in and retrieved from the cache using URI based
    46      keys. Content with access protection is not cached.</p>
    47  
    48      <p><code class="program"><a href="../programs/htcacheclean.html">htcacheclean</a></code> can be used to maintain the cache
    49         size at a maximum level.</p>
    50  
    51      <div class="note"><h3>Note:</h3>
    52        <p><code class="module"><a href="../mod/mod_disk_cache.html">mod_disk_cache</a></code> requires the services of
    53        <code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code>.</p>
    54      </div>
    55      <div class="note"><h3>Note:</h3>
    56        <p><code class="module"><a href="../mod/mod_disk_cache.html">mod_disk_cache</a></code> uses the sendfile feature to
    57        serve files from the cache when supported by the platform, and
    58        when enabled with <code class="directive"><a href="../mod/core.html#enablesendfile">EnableSendfile</a></code>.
    59        However, per-directory and .htaccess configuration of
    60        <code class="directive"><a href="../mod/core.html#enablesendfile">EnableSendfile</a></code> are ignored by
    61        <code class="module"><a href="../mod/mod_disk_cache.html">mod_disk_cache</a></code> as the corresponding settings are not
    62        available to the module when a request is being served from the
    63        cache.</p>
    64      </div>
    65  </div>
    66  <div id="quickview"><h3 class="directives">Directives</h3>
    67  <ul id="toc">
    68  <li><img alt="" src="../images/down.gif" /> <a href="#cachedirlength">CacheDirLength</a></li>
    69  <li><img alt="" src="../images/down.gif" /> <a href="#cachedirlevels">CacheDirLevels</a></li>
    70  <li><img alt="" src="../images/down.gif" /> <a href="#cachemaxfilesize">CacheMaxFileSize</a></li>
    71  <li><img alt="" src="../images/down.gif" /> <a href="#cacheminfilesize">CacheMinFileSize</a></li>
    72  <li><img alt="" src="../images/down.gif" /> <a href="#cacheroot">CacheRoot</a></li>
    73  </ul>
    74  <ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
    75  
    76  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
    77  <div class="directive-section"><h2><a name="CacheDirLength" id="CacheDirLength">CacheDirLength</a> <a name="cachedirlength" id="cachedirlength">Directive</a></h2>
    78  <table class="directive">
    79  <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The number of characters in subdirectory names</td></tr>
    80  <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheDirLength <var>length</var></code></td></tr>
    81  <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheDirLength 2</code></td></tr>
    82  <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
    83  <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
    84  <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
    85  </table>
    86      <p>The <code class="directive">CacheDirLength</code> directive sets the number
    87      of characters for each subdirectory name in the cache hierarchy.</p>
    88  
    89      <div class="note">
    90        <p>The result of <code class="directive"><a href="#cachedirlevels">CacheDirLevels</a></code>* <code class="directive">CacheDirLength</code>
    91        must not be higher than 20.</p>
    92      </div>
    93  
    94      <div class="example"><p><code>
    95        CacheDirLength  4
    96      </code></p></div>
    97  
    98  </div>
    99  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   100  <div class="directive-section"><h2><a name="CacheDirLevels" id="CacheDirLevels">CacheDirLevels</a> <a name="cachedirlevels" id="cachedirlevels">Directive</a></h2>
   101  <table class="directive">
   102  <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The number of levels of subdirectories in the
   103  cache.</td></tr>
   104  <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheDirLevels <var>levels</var></code></td></tr>
   105  <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheDirLevels 3</code></td></tr>
   106  <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
   107  <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
   108  <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
   109  </table>
   110      <p>The <code class="directive">CacheDirLevels</code> directive sets the number
   111      of subdirectory levels in the cache. Cached data will be saved this
   112      many directory levels below the <code class="directive"><a href="#cacheroot">CacheRoot</a></code> directory.</p>
   113  
   114      <div class="note">
   115        <p>The result of <code class="directive">CacheDirLevels</code>*
   116        <code class="directive"><a href="#cachedirlength">CacheDirLength</a></code> must
   117        not be higher than 20.</p>
   118      </div>
   119  
   120      <div class="example"><p><code>
   121        CacheDirLevels  5
   122      </code></p></div>
   123  
   124  </div>
   125  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   126  <div class="directive-section"><h2><a name="CacheMaxFileSize" id="CacheMaxFileSize">CacheMaxFileSize</a> <a name="cachemaxfilesize" id="cachemaxfilesize">Directive</a></h2>
   127  <table class="directive">
   128  <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The maximum size (in bytes) of a document to be placed in the
   129  cache</td></tr>
   130  <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheMaxFileSize <var>bytes</var></code></td></tr>
   131  <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheMaxFileSize 1000000</code></td></tr>
   132  <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
   133  <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
   134  <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
   135  </table>
   136      <p>The <code class="directive">CacheMaxFileSize</code> directive sets the
   137      maximum size, in bytes, for a document to be considered for storage in
   138      the cache.</p>
   139  
   140      <div class="example"><p><code>
   141        CacheMaxFileSize 64000
   142      </code></p></div>
   143  
   144  </div>
   145  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   146  <div class="directive-section"><h2><a name="CacheMinFileSize" id="CacheMinFileSize">CacheMinFileSize</a> <a name="cacheminfilesize" id="cacheminfilesize">Directive</a></h2>
   147  <table class="directive">
   148  <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The minimum size (in bytes) of a document to be placed in the
   149  cache</td></tr>
   150  <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheMinFileSize <var>bytes</var></code></td></tr>
   151  <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheMinFileSize 1</code></td></tr>
   152  <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
   153  <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
   154  <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
   155  </table>
   156      <p>The <code class="directive">CacheMinFileSize</code> directive sets the
   157      minimum size, in bytes, for a document to be considered for storage
   158      in the cache.</p>
   159  
   160      <div class="example"><p><code>
   161        CacheMinFileSize 64
   162      </code></p></div>
   163  
   164  </div>
   165  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   166  <div class="directive-section"><h2><a name="CacheRoot" id="CacheRoot">CacheRoot</a> <a name="cacheroot" id="cacheroot">Directive</a></h2>
   167  <table class="directive">
   168  <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The directory root under which cache files are
   169  stored</td></tr>
   170  <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheRoot <var>directory</var></code></td></tr>
   171  <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
   172  <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
   173  <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
   174  </table>
   175      <p>The <code class="directive">CacheRoot</code> directive defines the name of
   176      the directory on the disk to contain cache files. If the <code class="module"><a href="../mod/mod_disk_cache.html">mod_disk_cache</a></code> module has been loaded or compiled in to the
   177      Apache server, this directive <em>must</em> be defined. Failing to
   178      provide a value for <code class="directive">CacheRoot</code> will result in
   179      a configuration file processing error. The <code class="directive"><a href="#cachedirlevels">CacheDirLevels</a></code> and <code class="directive"><a href="#cachedirlength">CacheDirLength</a></code> directives define
   180      the structure of the directories under the specified root directory.</p>
   181  
   182      <div class="example"><p><code>
   183        CacheRoot c:/cacheroot
   184      </code></p></div>
   185  
   186  </div>
   187  </div>
   188  <div class="bottomlang">
   189  <p><span>Available Languages: </span><a href="../en/mod/mod_disk_cache.html" title="English">&nbsp;en&nbsp;</a> |
   190  <a href="../ja/mod/mod_disk_cache.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
   191  <a href="../ko/mod/mod_disk_cache.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
   192  </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
   193  <script type="text/javascript"><!--//--><![CDATA[//><!--
   194  var comments_shortname = 'httpd';
   195  var comments_identifier = 'http://httpd.apache.org/docs/2.2/mod/mod_disk_cache.html';
   196  (function(w, d) {
   197      if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
   198          d.write('<div id="comments_thread"><\/div>');
   199          var s = d.createElement('script');
   200          s.type = 'text/javascript';
   201          s.async = true;
   202          s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
   203          (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
   204      }
   205      else { 
   206          d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
   207      }
   208  })(window, document);
   209  //--><!]]></script></div><div id="footer">
   210  <p class="apache">Copyright 2017 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>
   211  <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
   212  if (typeof(prettyPrint) !== 'undefined') {
   213      prettyPrint();
   214  }
   215  //--><!]]></script>
   216  </body></html>