1
0
mirror of https://github.com/apache/httpd.git synced 2025-10-22 23:12:44 +03:00
Files
apache/docs/manual/mod/mod_mem_cache.html.en
Erik Abele 0658952d7b Fixed missing transformations
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96422 13f79535-47bb-0310-9956-ffa450edef68
2002-08-16 22:41:06 +00:00

113 lines
11 KiB
Plaintext

<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><!--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This file is generated from xml source: DO NOT EDIT
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
--><title>mod_mem_cache - Apache HTTP Server</title><link href="../style/manual.css" type="text/css" rel="stylesheet"></head><body><blockquote><div align="center"><img src="../images/sub.gif" alt="[APACHE DOCUMENTATION]"><h3>Apache HTTP Server Version 2.0</h3></div><h1 align="center">Apache Module mod_mem_cache</h1><table cellspacing="1" cellpadding="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td nowrap="nowrap" valign="top"><span class="help">Description:
</span></td><td>Content cache keyed to URIs</td></tr><tr><td nowrap="nowrap"><a href="module-dict.html#Status" class="help">Status:
</a></td><td>Experimental</td></tr><tr><td nowrap="nowrap"><a href="module-dict.html#ModuleIdentifier" class="help">Module&nbsp;Identifier:
</a></td><td>mem_cache_module</td></tr></table></td></tr></table><h2>Summary</h2>
<blockquote><table><tr><td bgcolor="#ffe5f5">
This module is experimental. Documentation is still under development...
</td></tr></table></blockquote>
<p>mod_mem_cache implements an in-memory based storage manager.
mod_mem_cache can be configured to operate in two modes: caching open file
descriptors or caching objects in heap storage. <em>mod_mem_cache</em>
is most useful when used to cache locally generated content or to cache
backend server content for <code><a href="../mod/mod_proxy.html">mod_proxy</a></code> configured for ProxyPass
(aka <em>reverse proxy</em>)</p>
<blockquote><table><tr><td bgcolor="#e0e5f5">
<p><code><a href="../mod/mod_mem_cache.html">mod_mem_cache</a></code> requires the services of <code><a href="../mod/mod_cache.html">mod_cache</a></code>.</p>
</td></tr></table></blockquote>
<p>Content stored and retrived keyed to the URL. Content with
access protections is not cached.</p>
<h2>Directives</h2><ul><li><a href="#mcachemaxobjectcount">MCacheMaxObjectCount</a></li><li><a href="#mcachemaxobjectsize">MCacheMaxObjectSize</a></li><li><a href="#mcacheminobjectsize">MCacheMinObjectSize</a></li><li><a href="#mcacheremovalalgorithm">MCacheRemovalAlgorithm</a></li><li><a href="#mcachesize">MCacheSize</a></li></ul><hr><h2><a name="MCacheMaxObjectCount">MCacheMaxObjectCount</a> <a name="mcachemaxobjectcount">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td nowrap="nowrap"><strong>Description:
</strong></td><td>The maximum number of objects allowed to be placed in the cache</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Syntax" class="help">Syntax:
</a></td><td>MCacheMaxObjectCount <em>value</em></td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Default" class="help">Default:
</a></td><td><code>MCacheMaxObjectCount 1009</code></td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Context" class="help">Context:
</a></td><td>server config</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Status" class="help">Status:
</a></td><td>Experimental</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Module" class="help">Module:
</a></td><td>mod_mem_cache</td></tr></table></td></tr></table>
<p>The <code class="directive">MCacheMaxObjectCount</code> directive sets the maximum
number of objects to be cached. If a new entry needs to be
inserted in the cache and the maximum number of objects is reached, an entry
will be removed to allow the new entry be cached. </p>
<blockquote><table><tr><td bgcolor="#ffe5f5">
The size must be greater than <code class="directive">MCacheMinObjectSize</code>.
</td></tr></table></blockquote>
<blockquote><table><tr><td bgcolor="#e0e5f5">
The value of <code class="directive">MCacheMaxObjectCount</code> is used to create
the open hash table.
</td></tr></table></blockquote>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
MCacheMaxObjectCount 13001 <br>
</code></td></tr></table></blockquote>
<hr><h2><a name="MCacheMaxObjectSize">MCacheMaxObjectSize</a> <a name="mcachemaxobjectsize">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td nowrap="nowrap"><strong>Description:
</strong></td><td>The maximum size (in bytes) of an object to be placed in the cache</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Syntax" class="help">Syntax:
</a></td><td>MCacheMaxObjectSize <em>bytes</em></td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Default" class="help">Default:
</a></td><td><code>MCacheMaxObjectSize 10000</code></td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Context" class="help">Context:
</a></td><td>server config</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Status" class="help">Status:
</a></td><td>Experimental</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Module" class="help">Module:
</a></td><td>mod_mem_cache</td></tr></table></td></tr></table>
<p>The <code class="directive">MCacheMaxObjectSize</code> directive sets the maximum
size of an object to be cached.</p>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
MCacheMaxObjectSize 6400000 <br>
</code></td></tr></table></blockquote>
<hr><h2><a name="MCacheMinObjectSize">MCacheMinObjectSize</a> <a name="mcacheminobjectsize">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td nowrap="nowrap"><strong>Description:
</strong></td><td>The minimum size (in bytes) of an object to be placed in the cache</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Syntax" class="help">Syntax:
</a></td><td>MCacheMinObjectSize <em>bytes</em></td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Default" class="help">Default:
</a></td><td><code>MCacheMinObjectSize 0</code></td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Context" class="help">Context:
</a></td><td>server config</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Status" class="help">Status:
</a></td><td>Experimental</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Module" class="help">Module:
</a></td><td>mod_mem_cache</td></tr></table></td></tr></table>
<p>The <code class="directive">MCacheMinObjectSize</code> directive sets the minimum
size in bytes of an object to be cached.</p>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
MCacheMinObjectSize 10000 <br>
</code></td></tr></table></blockquote>
<hr><h2><a name="MCacheRemovalAlgorithm">MCacheRemovalAlgorithm</a> <a name="mcacheremovalalgorithm">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td nowrap="nowrap"><strong>Description:
</strong></td><td>The algorithm used to remove entries from the cache</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Syntax" class="help">Syntax:
</a></td><td>MCacheRemovalAlgorithm <em>algorithm</em></td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Default" class="help">Default:
</a></td><td><code>MCacheRemovalAlgorithm GDSF</code></td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Context" class="help">Context:
</a></td><td>server config</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Status" class="help">Status:
</a></td><td>Experimental</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Module" class="help">Module:
</a></td><td>mod_mem_cache</td></tr></table></td></tr></table>
<p>The <code class="directive">MCacheRemovalAlgorithm</code> directive sets the algorithm
used to remove entries from the cache.
Two choices are available: <br>
LRU (Least Recently Used): LRU removes the objects that have not been
accessed for the longest time.<br>
GDSF (GreadyDual-Size): This algorithm assigns priority to cached objects
based on the coast of a cache miss and the size of the object. Objects with
smallest priority are removed first.</p>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
MCacheRemovalAlgorithm GDSF <br>
MCacheRemovalAlgorithm LRU <br>
</code></td></tr></table></blockquote>
<hr><h2><a name="MCacheSize">MCacheSize</a> <a name="mcachesize">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td nowrap="nowrap"><strong>Description:
</strong></td><td>The maximum amount of memory used by the cache in KBytes</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Syntax" class="help">Syntax:
</a></td><td>MCacheSize <em>KBytes</em></td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Default" class="help">Default:
</a></td><td><code>MCacheSize 100</code></td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Context" class="help">Context:
</a></td><td>server config</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Status" class="help">Status:
</a></td><td>Experimental</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Module" class="help">Module:
</a></td><td>mod_mem_cache</td></tr></table></td></tr></table>
<p>The <code class="directive">MCacheSize</code> directive sets the desired space
usage of the cache, in KBytes (1024-byte units). If a new entry needs to be
inserted in the cache and the size of the entry is greather than the
remaining size, entries will be removed until the new entry could be cached.
The removed entry is decided base on the <code class="directive">MCacheRemovalAlgorithm</code> algorithm</p>
<blockquote><table><tr><td bgcolor="#ffe5f5">
The size must be greater than <code class="directive">MCacheMaxObjectSize</code>.
</td></tr></table></blockquote>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
MCacheSize 700000 <br>
</code></td></tr></table></blockquote>
<hr></blockquote><h3 align="center">Apache HTTP Server Version 2.0</h3><a href="./"><img src="../images/index.gif" alt="Index"></a><a href="../"><img src="../images/home.gif" alt="Home"></a></body></html>