<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 class="note"><h3>Note</h3>In most cases <code class="module"><a href="../mod/mod_disk_cache.html">mod_disk_cache</a></code>
should be the preferred choice. This is explained further in the <a href="../caching.html#inmemory">Caching Guide</a>.</div>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MCacheMaxStreamingBuffer the smaller of 100000 or MCacheMaxObjectSize</code></td></tr>
<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"> 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><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>