📄 mod_mem_cache.html.en
字号:
<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!-- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX This file is generated from xml source: DO NOT EDIT XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --><title>mod_mem_cache - Apache HTTP Server</title><link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /><link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /><link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link href="../images/favicon.ico" rel="shortcut icon" /></head><body><div id="page-header"><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><p class="apache">Apache HTTP Server Version 2.0</p><img alt="" src="../images/feather.gif" /></div><div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div><div id="path"><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.0</a> > <a href="./">Modules</a></div><div id="page-content"><div id="preamble"><h1>Apache Module mod_mem_cache</h1><div class="toplang"><p><span>Available Languages: </span><a href="../en/mod/mod_mem_cache.html" title="English"> en </a> |<a href="../ja/mod/mod_mem_cache.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |<a href="../ko/mod/mod_mem_cache.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p></div><table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Content cache keyed to URIs</td></tr><tr><th><a href="module-dict.html#Status">Status:</a></th><td>Experimental</td></tr><tr><th><a href="module-dict.html#ModuleIdentifier">Module營dentifier:</a></th><td>mem_cache_module</td></tr><tr><th><a href="module-dict.html#SourceFile">Source燜ile:</a></th><td>mod_mem_cache.c</td></tr></table><h3>Summary</h3> <div class="warning"> This module is experimental. Documentation is still under development... </div> <p>This module <em>requires</em> the service of <code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code>. It acts as a support module for <code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code> and provides a memory based storage manager. <code class="module"><a href="../mod/mod_mem_cache.html">mod_mem_cache</a></code> can be configured to operate in two modes: caching open file descriptors or caching objects in heap storage. <code class="module"><a href="../mod/mod_mem_cache.html">mod_mem_cache</a></code> is most useful when used to cache locally generated content or to cache backend server content for <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> configured for <code class="directive"><a href="../mod/mod_proxy.html#proxypass">ProxyPass</a></code> (aka <dfn>reverse proxy</dfn>).</p> <p>Content is stored in and retrieved from the cache using URI based keys. Content with access protection is not cached.</p></div><div id="quickview"><h3 class="directives">Directives</h3><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#mcachemaxobjectcount">MCacheMaxObjectCount</a></li><li><img alt="" src="../images/down.gif" /> <a href="#mcachemaxobjectsize">MCacheMaxObjectSize</a></li><li><img alt="" src="../images/down.gif" /> <a href="#mcachemaxstreamingbuffer">MCacheMaxStreamingBuffer</a></li><li><img alt="" src="../images/down.gif" /> <a href="#mcacheminobjectsize">MCacheMinObjectSize</a></li><li><img alt="" src="../images/down.gif" /> <a href="#mcacheremovalalgorithm">MCacheRemovalAlgorithm</a></li><li><img alt="" src="../images/down.gif" /> <a href="#mcachesize">MCacheSize</a></li></ul><h3>See also</h3><ul class="seealso"><li><code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code></li><li><code class="module"><a href="../mod/mod_disk_cache.html">mod_disk_cache</a></code></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="MCacheMaxObjectCount" id="MCacheMaxObjectCount">MCacheMaxObjectCount</a> <a name="mcachemaxobjectcount" id="mcachemaxobjectcount">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The maximum number of objects allowed to be placed in thecache</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MCacheMaxObjectCount <var>value</var></code></td></tr><tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MCacheMaxObjectCount 1009</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">MCacheMaxObjectCount</code> directive sets the maximum number of objects to be cached. The value is used to create the open hash table. If a new object needs to be inserted in the cache and the maximum number of objects has been reached, an object will be removed to allow the new object to 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> MCacheMaxObjectCount 13001 </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="MCacheMaxObjectSize" id="MCacheMaxObjectSize">MCacheMaxObjectSize</a> <a name="mcachemaxobjectsize" id="mcachemaxobjectsize">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The maximum size (in bytes) of a document allowed in thecache</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MCacheMaxObjectSize <var>bytes</var></code></td></tr><tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MCacheMaxObjectSize 10000</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">MCacheMaxObjectSize</code> directive sets the maximum allowable size, in bytes, of a document for it to be considered cacheable.</p> <div class="example"><h3>Example</h3><p><code> MCacheMaxObjectSize 6400000 </code></p></div> <div class="note"><h3>Note</h3> <p>The value of <code class="directive">MCacheMaxObjectSize</code> must be greater than the value specified by the <code class="directive"><a href="#mcacheminobjectsize">MCacheMinObjectSize</a></code> directive.</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="MCacheMaxStreamingBuffer" id="MCacheMaxStreamingBuffer">MCacheMaxStreamingBuffer</a> <a name="mcachemaxstreamingbuffer" id="mcachemaxstreamingbuffer">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum amount of a streamed response to buffer in memorybefore declaring the response uncacheable</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MCacheMaxStreamingBuffer <var>size_in_bytes</var></code></td></tr><tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MCacheMaxStreamingBuffer the smaller of 100000 or MCacheMaxObjectSize</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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -