1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5 This file is generated from xml source: DO NOT EDIT
6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
8 <title>mod_disk_cache - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
12 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
14 <div id="page-header">
15 <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>
16 <p class="apache">Apache HTTP Server Version 2.0</p>
17 <img alt="" src="../images/feather.gif" /></div>
18 <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
20 <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>
21 <div id="page-content">
22 <div id="preamble"><h1>Apache Module mod_disk_cache</h1>
24 <p><span>Available Languages: </span><a href="../en/mod/mod_disk_cache.html" title="English"> en </a> |
25 <a href="../ko/mod/mod_disk_cache.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
27 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Content cache storage manager keyed to URIs</td></tr>
28 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
29 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>disk_cache_module</td></tr>
30 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_disk_cache.c</td></tr></table>
34 This module is experimental. Documentation is still under development...
37 <p><code class="module"><a href="../mod/mod_disk_cache.html">mod_disk_cache</a></code> implements a disk based storage
38 manager. It is primarily of use in conjunction with
39 <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>.</p>
41 <p>Content is stored in and retrieved from the cache using URI based
42 keys. Content with access protection is not cached.</p>
44 <div class="note"><h3>Note:</h3>
45 <p><code class="module"><a href="../mod/mod_disk_cache.html">mod_disk_cache</a></code> requires the services of
46 <code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code>.</p>
49 <div id="quickview"><h3 class="directives">Directives</h3>
51 <li><img alt="" src="../images/down.gif" /> <a href="#cachedirlength">CacheDirLength</a></li>
52 <li><img alt="" src="../images/down.gif" /> <a href="#cachedirlevels">CacheDirLevels</a></li>
53 <li><img alt="" src="../images/down.gif" /> <a href="#cacheexpirycheck">CacheExpiryCheck</a></li>
54 <li><img alt="" src="../images/down.gif" /> <a href="#cachegcclean">CacheGcClean</a></li>
55 <li><img alt="" src="../images/down.gif" /> <a href="#cachegcdaily">CacheGcDaily</a></li>
56 <li><img alt="" src="../images/down.gif" /> <a href="#cachegcinterval">CacheGcInterval</a></li>
57 <li><img alt="" src="../images/down.gif" /> <a href="#cachegcmemusage">CacheGcMemUsage</a></li>
58 <li><img alt="" src="../images/down.gif" /> <a href="#cachegcunused">CacheGcUnused</a></li>
59 <li><img alt="" src="../images/down.gif" /> <a href="#cachemaxfilesize">CacheMaxFileSize</a></li>
60 <li><img alt="" src="../images/down.gif" /> <a href="#cacheminfilesize">CacheMinFileSize</a></li>
61 <li><img alt="" src="../images/down.gif" /> <a href="#cacheroot">CacheRoot</a></li>
62 <li><img alt="" src="../images/down.gif" /> <a href="#cachesize">CacheSize</a></li>
63 <li><img alt="" src="../images/down.gif" /> <a href="#cachetimemargin">CacheTimeMargin</a></li>
67 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
68 <div class="directive-section"><h2><a name="CacheDirLength" id="CacheDirLength">CacheDirLength</a> <a name="cachedirlength" id="cachedirlength">Directive</a></h2>
69 <table class="directive">
70 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The number of characters in subdirectory names</td></tr>
71 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheDirLength <var>length</var></code></td></tr>
72 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheDirLength 2</code></td></tr>
73 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
74 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
75 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
77 <p>The <code class="directive">CacheDirLength</code> directive sets the number
78 of characters for each subdirectory name in the cache hierarchy.</p>
81 <p>The result of <code class="directive"><a href="#cachedirlevels">CacheDirLevels</a></code>* <code class="directive">CacheDirLength</code>
82 must not be higher than 20.</p>
85 <div class="example"><p><code>
90 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
91 <div class="directive-section"><h2><a name="CacheDirLevels" id="CacheDirLevels">CacheDirLevels</a> <a name="cachedirlevels" id="cachedirlevels">Directive</a></h2>
92 <table class="directive">
93 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The number of levels of subdirectories in the
95 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheDirLevels <var>levels</var></code></td></tr>
96 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheDirLevels 3</code></td></tr>
97 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
98 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
99 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
101 <p>The <code class="directive">CacheDirLevels</code> directive sets the number
102 of subdirectory levels in the cache. Cached data will be saved this
103 many directory levels below the <code class="directive"><a href="#cacheroot">CacheRoot</a></code> directory.</p>
106 <p>The result of <code class="directive">CacheDirLevels</code>*
107 <code class="directive"><a href="#cachedirlength">CacheDirLength</a></code> must
108 not be higher than 20.</p>
111 <div class="example"><p><code>
116 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
117 <div class="directive-section"><h2><a name="CacheExpiryCheck" id="CacheExpiryCheck">CacheExpiryCheck</a> <a name="cacheexpirycheck" id="cacheexpirycheck">Directive</a></h2>
118 <table class="directive">
119 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Indicates if the cache observes Expires dates when seeking
121 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheExpiryCheck On|Off</code></td></tr>
122 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheExpiryCheck On</code></td></tr>
123 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
124 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
125 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
127 <p>More detail will be added here, when the function is implemented.</p>
129 <div class="example"><p><code>
130 CacheExpiryCheck Off<br />
133 <div class="warning">
134 The <code class="directive">CacheExpiryCheck</code> directive is currently
135 <em>not</em> implemented.
139 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
140 <div class="directive-section"><h2><a name="CacheGcClean" id="CacheGcClean">CacheGcClean</a> <a name="cachegcclean" id="cachegcclean">Directive</a></h2>
141 <table class="directive">
142 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The time to retain unchanged cached files that match a
144 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheGcClean <var>hours</var> <var>url-string</var></code></td></tr>
145 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheGcClean ?</code></td></tr>
146 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
147 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
148 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
150 <p>More detail will be added here, when the function is implemented.</p>
152 <div class="example"><p><code>
153 CacheGcClean 12 /daily_scripts
156 <div class="warning">
157 The <code class="directive">CacheGcClean</code> directive is currently
158 <em>not</em> implemented.
162 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
163 <div class="directive-section"><h2><a name="CacheGcDaily" id="CacheGcDaily">CacheGcDaily</a> <a name="cachegcdaily" id="cachegcdaily">Directive</a></h2>
164 <table class="directive">
165 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The recurring time each day for garbage collection to be run.
166 (24 hour clock)</td></tr>
167 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheGcDaily <var>time</var></code></td></tr>
168 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheGcDaily ?</code></td></tr>
169 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
170 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
171 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
173 <p>More detail will be added here, when the function is implemented.</p>
175 <div class="example"><p><code>
179 <div class="warning">
180 The <code class="directive">CacheGcDaily</code> directive is currently
181 <em>not</em> implemented.
185 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
186 <div class="directive-section"><h2><a name="CacheGcInterval" id="CacheGcInterval">CacheGcInterval</a> <a name="cachegcinterval" id="cachegcinterval">Directive</a></h2>
187 <table class="directive">
188 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The interval between garbage collection attempts.</td></tr>
189 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheGcInterval <var>hours</var></code></td></tr>
190 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
191 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
192 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
194 <p>The <code class="directive">CacheGcInterval</code> directive specifies the
195 number of hours to wait between attempts to free up disk space.</p>
196 <p>More detail will be added here, when the function is implemented.</p>
198 <div class="example"><p><code>
199 CacheGcInterval 24<br />
202 <div class="warning">
203 The <code class="directive">CacheGcInterval</code> directive is currently
204 <em>not</em> implemented.
208 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
209 <div class="directive-section"><h2><a name="CacheGcMemUsage" id="CacheGcMemUsage">CacheGcMemUsage</a> <a name="cachegcmemusage" id="cachegcmemusage">Directive</a></h2>
210 <table class="directive">
211 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The maximum kilobytes of memory used for garbage
213 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheGcMemUsage <var>KBytes</var></code></td></tr>
214 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheGcMemUsage ?</code></td></tr>
215 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
216 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
217 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
219 <p>More detail will be added here, when the function is implemented.</p>
221 <div class="example"><p><code>
225 <div class="warning">
226 The <code class="directive">CacheGcMemUsage</code> directive is currently
227 <em>not</em> implemented.
231 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
232 <div class="directive-section"><h2><a name="CacheGcUnused" id="CacheGcUnused">CacheGcUnused</a> <a name="cachegcunused" id="cachegcunused">Directive</a></h2>
233 <table class="directive">
234 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The time to retain unreferenced cached files that match a
236 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheGcUnused <var>hours</var> <var>url-string</var></code></td></tr>
237 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheGcUnused ?</code></td></tr>
238 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
239 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
240 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
242 <p>More detail will be added here, when the function is implemented.</p>
244 <div class="example"><p><code>
245 CacheGcUnused 12 /local_images
248 <div class="warning">
249 The <code class="directive">CacheGcUnused</code> directive is currently
250 <em>not</em> implemented.
254 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
255 <div class="directive-section"><h2><a name="CacheMaxFileSize" id="CacheMaxFileSize">CacheMaxFileSize</a> <a name="cachemaxfilesize" id="cachemaxfilesize">Directive</a></h2>
256 <table class="directive">
257 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The maximum size (in bytes) of a document to be placed in the
259 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheMaxFileSize <var>bytes</var></code></td></tr>
260 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheMaxFileSize 1000000</code></td></tr>
261 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
262 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
263 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
265 <p>The <code class="directive">CacheMaxFileSize</code> directive sets the
266 maximum size, in bytes, for a document to be considered for storage in
269 <div class="example"><p><code>
270 CacheMaxFileSize 64000
274 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
275 <div class="directive-section"><h2><a name="CacheMinFileSize" id="CacheMinFileSize">CacheMinFileSize</a> <a name="cacheminfilesize" id="cacheminfilesize">Directive</a></h2>
276 <table class="directive">
277 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The minimum size (in bytes) of a document to be placed in the
279 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheMinFileSize <var>bytes</var></code></td></tr>
280 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheMinFileSize 1</code></td></tr>
281 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
282 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
283 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
285 <p>The <code class="directive">CacheMinFileSize</code> directive sets the
286 minimum size, in bytes, for a document to be considered for storage
289 <div class="example"><p><code>
294 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
295 <div class="directive-section"><h2><a name="CacheRoot" id="CacheRoot">CacheRoot</a> <a name="cacheroot" id="cacheroot">Directive</a></h2>
296 <table class="directive">
297 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The directory root under which cache files are
299 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheRoot <var>directory</var></code></td></tr>
300 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
301 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
302 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
304 <p>The <code class="directive">CacheRoot</code> directive defines the name of
305 the directory on the disk to contain cache files. If the <code class="module"><a href="../mod/mod_disk_cache.html">mod_disk_cache</a></code> module has been loaded or compiled in to the
306 Apache server, this directive <em>must</em> be defined. Failing to
307 provide a value for <code class="directive">CacheRoot</code> will result in
308 a configuration file processing error. The <code class="directive"><a href="#cachedirlevels">CacheDirLevels</a></code> and <code class="directive"><a href="#cachedirlength">CacheDirLength</a></code> directives define
309 the structure of the directories under the specified root directory.</p>
311 <div class="example"><p><code>
312 CacheRoot c:/cacheroot
316 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
317 <div class="directive-section"><h2><a name="CacheSize" id="CacheSize">CacheSize</a> <a name="cachesize" id="cachesize">Directive</a></h2>
318 <table class="directive">
319 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The maximum amount of disk space that will be used by the
320 cache in KBytes</td></tr>
321 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheSize <var>KBytes</var></code></td></tr>
322 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheSize 1000000</code></td></tr>
323 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
324 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
325 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
327 <p>The <code class="directive">CacheSize</code> directive sets the desired
328 disk space usage of the cache, in KBytes (1024-byte units). This
329 directive does not put a hard limit on the size of the cache. The
330 garbage collector will delete files until the usage is at or below the
331 settings. Always use a value that is lower than the available disk
334 <div class="example"><p><code>
339 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
340 <div class="directive-section"><h2><a name="CacheTimeMargin" id="CacheTimeMargin">CacheTimeMargin</a> <a name="cachetimemargin" id="cachetimemargin">Directive</a></h2>
341 <table class="directive">
342 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The minimum time margin to cache a document</td></tr>
343 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheTimeMargin <var>?</var></code></td></tr>
344 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheTimeMargin ?</code></td></tr>
345 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
346 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
347 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_disk_cache</td></tr>
349 <p>More detail will be added here, when the function is implemented.</p>
351 <div class="example"><p><code>
355 <div class="warning">
356 The <code class="directive">CacheTimeMargin</code> directive is currently
357 <em>not</em> implemented.
362 <div class="bottomlang">
363 <p><span>Available Languages: </span><a href="../en/mod/mod_disk_cache.html" title="English"> en </a> |
364 <a href="../ko/mod/mod_disk_cache.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
365 </div><div id="footer">
366 <p class="apache">Copyright 2009 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>
367 <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>