⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mod_mem_cache.html.en

📁 apache的软件linux版本
💻 EN
📖 第 1 页 / 共 2 页
字号:
    <p>The <code class="directive">MCacheMaxStreamingBuffer</code> directive    specifies the maximum number of bytes of a streamed response to    buffer before deciding that the response is too big to cache.    A streamed response is one in which the entire content is not    immediately available and in which the <code>Content-Length</code>    may not be known. Sources of streaming responses include proxied    responses and the output of CGI scripts. By default, a streamed    response will <em>not</em> be cached unless it has a    <code>Content-Length</code> header. The reason for this is to    avoid using a large amount of memory to buffer a partial response    that might end up being too large to fit in the cache.    The <code class="directive">MCacheMaxStreamingBuffer</code> directive allows    buffering of streamed responses that don't contain a    <code>Content-Length</code> up to the specified maximum amount of    space. If the maximum buffer space is reached, the buffered    content is discarded and the attempt to cache is abandoned.</p>    <div class="note"><h3>Note:</h3>      <p>Using a nonzero value for <code class="directive">MCacheMaxStreamingBuffer</code>       will not delay the transmission of the response to the client.      As soon as <code class="module"><a href="../mod/mod_mem_cache.html">mod_mem_cache</a></code> copies a block of streamed      content into a buffer, it sends the block on to the next output      filter for delivery to the client.</p>    </div>    <div class="example"><p><code>      # Enable caching of streamed responses up to 64KB:<br />      MCacheMaxStreamingBuffer 65536    </code></p></div></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="MCacheMinObjectSize" id="MCacheMinObjectSize">MCacheMinObjectSize</a> <a name="mcacheminobjectsize" id="mcacheminobjectsize">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The minimum size (in bytes) of a document to be allowed in thecache</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MCacheMinObjectSize <var>bytes</var></code></td></tr><tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MCacheMinObjectSize 0</code></td></tr><tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr><tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr><tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_mem_cache</td></tr></table>    <p>The <code class="directive">MCacheMinObjectSize</code> directive sets the    minimum size in bytes of a document for it to be considered    cacheable.</p>    <div class="example"><h3>Example</h3><p><code>      MCacheMinObjectSize 10000    </code></p></div></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="MCacheRemovalAlgorithm" id="MCacheRemovalAlgorithm">MCacheRemovalAlgorithm</a> <a name="mcacheremovalalgorithm" id="mcacheremovalalgorithm">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The algorithm used to select documents for removal from thecache</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MCacheRemovalAlgorithm LRU|GDSF</code></td></tr><tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MCacheRemovalAlgorithm GDSF</code></td></tr><tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr><tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr><tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_mem_cache</td></tr></table>    <p>The <code class="directive">MCacheRemovalAlgorithm</code> directive specifies    the algorithm used to select documents for removal from the cache.    Two choices are available:</p>    <dl>      <dt><code>LRU</code> (Least Recently Used)</dt>      <dd><code>LRU</code> removes the documents that have not been accessed      for the longest time.</dd>      <dt><code>GDSF</code> (GreadyDual-Size)</dt>      <dd><code>GDSF</code> assigns a priority to cached documents based      on the cost of a cache miss and the size of the document. Documents      with the lowest priority are removed first.</dd>    </dl>    <div class="example"><h3>Example</h3><p><code>      MCacheRemovalAlgorithm GDSF<br />      MCacheRemovalAlgorithm LRU    </code></p></div></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="MCacheSize" id="MCacheSize">MCacheSize</a> <a name="mcachesize" id="mcachesize">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The maximum amount of memory used by the cache inKBytes</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MCacheSize <var>KBytes</var></code></td></tr><tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MCacheSize 100</code></td></tr><tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr><tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr><tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_mem_cache</td></tr></table>    <p>The <code class="directive">MCacheSize</code> directive sets the maximum    amount of memory to be used by the cache, in KBytes (1024-byte units).    If a new object needs to be inserted in the cache and the size of the    object is greater than the remaining memory, objects will be removed    until the new object can be cached. The object to be removed is    selected using the algorithm specified by <code class="directive"><a href="#mcacheremovalalgorithm">MCacheRemovalAlgorithm</a></code>.</p>    <div class="example"><h3>Example</h3><p><code>      MCacheSize 700000    </code></p></div>    <div class="note"><h3>Note</h3>      <p>The <code class="directive">MCacheSize</code> value must be greater than      the value specified by the <code class="directive"><a href="#mcachemaxobjectsize">MCacheMaxObjectSize</a></code> directive.</p>    </div></div></div><div class="bottomlang"><p><span>Available Languages: </span><a href="../en/mod/mod_mem_cache.html" title="English">&nbsp;en&nbsp;</a> |<a href="../ja/mod/mod_mem_cache.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |<a href="../ko/mod/mod_mem_cache.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p></div><div id="footer"><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><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></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -