mirror of
https://github.com/apache/httpd.git
synced 2025-06-10 18:21:43 +03:00
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97134 13f79535-47bb-0310-9956-ffa450edef68
121 lines
11 KiB
XML
121 lines
11 KiB
XML
<?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-project/">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><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 Identifier:
|
||
</a></th><td>mem_cache_module</td></tr><tr><th><a href="module-dict.html#SourceFile">Source File:
|
||
</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>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 class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> configured for ProxyPass
|
||
(aka <em>reverse proxy</em>)</p>
|
||
<div class="note">
|
||
<p><code class="module"><a href="../mod/mod_mem_cache.html">mod_mem_cache</a></code> requires the services of <code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code>.</p>
|
||
</div>
|
||
<p>Content stored and retrived keyed to the URL. Content with
|
||
access protections 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="#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></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 the cache</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
|
||
</a></th><td><code>MCacheMaxObjectCount <em>value</em></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. 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>
|
||
|
||
<div class="note">
|
||
The value of <code class="directive">MCacheMaxObjectCount</code> is used to create
|
||
the open hash table.
|
||
</div>
|
||
<div class="example"><p><code>
|
||
MCacheMaxObjectCount 13001 <br />
|
||
</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 an object to be placed in the cache</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
|
||
</a></th><td><code>MCacheMaxObjectSize <em>bytes</em></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
|
||
size of an object to be cached.</p>
|
||
|
||
<div class="warning">
|
||
The size must be greater than <code class="directive">MCacheMinObjectSize</code>.
|
||
</div>
|
||
|
||
<div class="example"><p><code>
|
||
MCacheMaxObjectSize 6400000 <br />
|
||
</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 an object to be placed in the cache</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
|
||
</a></th><td><code>MCacheMinObjectSize <em>bytes</em></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 an object to be cached.</p>
|
||
|
||
<div class="example"><p><code>
|
||
MCacheMinObjectSize 10000 <br />
|
||
</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 remove entries from the cache</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
|
||
</a></th><td><code>MCacheRemovalAlgorithm <em>algorithm</em></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 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>
|
||
|
||
<div class="example"><p><code>
|
||
MCacheRemovalAlgorithm GDSF <br />
|
||
MCacheRemovalAlgorithm LRU <br />
|
||
</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 in KBytes</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
|
||
</a></th><td><code>MCacheSize <em>KBytes</em></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 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>
|
||
|
||
<div class="warning">
|
||
The size must be greater than <code class="directive">MCacheMaxObjectSize</code>.
|
||
</div>
|
||
|
||
<div class="example"><p><code>
|
||
MCacheSize 700000 <br />
|
||
</code></p></div>
|
||
</div></div><div id="footer"><p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</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> |