2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
6 Copyright 2002-2004 The Apache Software Foundation
8 Licensed under the Apache License, Version 2.0 (the "License");
9 you may not use this file except in compliance with the License.
10 You may obtain a copy of the License at
12 http://www.apache.org/licenses/LICENSE-2.0
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
21 <modulesynopsis metafile="mod_disk_cache.xml.meta">
23 <name>mod_disk_cache</name>
24 <description>Content cache storage manager keyed to URIs</description>
25 <status>Experimental</status>
26 <sourcefile>mod_disk_cache.c</sourcefile>
27 <identifier>disk_cache_module</identifier>
31 This module is experimental. Documentation is still under development...
34 <p><module>mod_disk_cache</module> implements a disk based storage
35 manager. It is primarily of use in conjunction with
36 <module>mod_proxy</module>.</p>
38 <p>Content is stored in and retrieved from the cache using URI based
39 keys. Content with access protection is not cached.</p>
41 <note><title>Note:</title>
42 <p><module>mod_disk_cache</module> requires the services of
43 <module>mod_cache</module>.</p>
48 <name>CacheRoot</name>
49 <description>The directory root under which cache files are
51 <syntax>CacheRoot <var>directory</var></syntax>
52 <contextlist><context>server config</context><context>virtual host</context>
56 <p>The <directive>CacheRoot</directive> directive defines the name of
57 the directory on the disk to contain cache files. If the <module
58 >mod_disk_cache</module> module has been loaded or compiled in to the
59 Apache server, this directive <em>must</em> be defined. Failing to
60 provide a value for <directive>CacheRoot</directive> will result in
61 a configuration file processing error. The <directive
62 module="mod_disk_cache">CacheDirLevels</directive> and <directive
63 module="mod_disk_cache">CacheDirLength</directive> directives define
64 the structure of the directories under the specified root directory.</p>
67 CacheRoot c:/cacheroot
73 <name>CacheSize</name>
74 <description>The maximum amount of disk space that will be used by the
75 cache in KBytes</description>
76 <syntax>CacheSize <var>KBytes</var></syntax>
77 <default>CacheSize 1000000</default>
78 <contextlist><context>server config</context><context>virtual host</context>
82 <p>The <directive>CacheSize</directive> directive sets the desired
83 disk space usage of the cache, in KBytes (1024-byte units). This
84 directive does not put a hard limit on the size of the cache. The
85 garbage collector will delete files until the usage is at or below the
86 settings. Always use a value that is lower than the available disk
96 <name>CacheGcInterval</name>
97 <description>The interval between garbage collection attempts.</description>
98 <syntax>CacheGcInterval <var>hours</var></syntax>
99 <contextlist><context>server config</context><context>virtual host</context>
103 <p>The <directive>CacheGcInterval</directive> directive specifies the
104 number of hours to wait between attempts to free up disk space.</p>
105 <p>More detail will be added here, when the function is implemented.</p>
108 CacheGcInterval 24<br />
111 <note type="warning">
112 The <directive>CacheGcInterval</directive> directive is currently
113 <em>not</em> implemented.
119 <name>CacheDirLevels</name>
120 <description>The number of levels of subdirectories in the
122 <syntax>CacheDirLevels <var>levels</var></syntax>
123 <default>CacheDirLevels 3</default>
124 <contextlist><context>server config</context><context>virtual host</context>
128 <p>The <directive>CacheDirLevels</directive> directive sets the number
129 of subdirectory levels in the cache. Cached data will be saved this
130 many directory levels below the <directive module="mod_disk_cache"
131 >CacheRoot</directive> directory.</p>
134 <p>The result of <directive>CacheDirLevels</directive>*
135 <directive module="mod_disk_cache">CacheDirLength</directive> must
136 not be higher than 20.</p>
146 <name>CacheDirLength</name>
147 <description>The number of characters in subdirectory names</description>
148 <syntax>CacheDirLength <var>length</var></syntax>
149 <default>CacheDirLength 2</default>
150 <contextlist><context>server config</context><context>virtual host</context>
154 <p>The <directive>CacheDirLength</directive> directive sets the number
155 of characters for each subdirectory name in the cache hierarchy.</p>
158 <p>The result of <directive module="mod_disk_cache"
159 >CacheDirLevels</directive>* <directive>CacheDirLength</directive>
160 must not be higher than 20.</p>
170 <name>CacheExpiryCheck</name>
171 <description>Indicates if the cache observes Expires dates when seeking
173 <syntax>CacheExpiryCheck On|Off</syntax>
174 <default>CacheExpiryCheck On</default>
175 <contextlist><context>server config</context><context>virtual host</context>
179 <p>More detail will be added here, when the function is implemented.</p>
182 CacheExpiryCheck Off<br />
185 <note type="warning">
186 The <directive>CacheExpiryCheck</directive> directive is currently
187 <em>not</em> implemented.
193 <name>CacheMinFileSize</name>
194 <description>The minimum size (in bytes) of a document to be placed in the
196 <syntax>CacheMinFileSize <var>bytes</var></syntax>
197 <default>CacheMinFileSize 1</default>
198 <contextlist><context>server config</context><context>virtual host</context>
202 <p>The <directive>CacheMinFileSize</directive> directive sets the
203 minimum size, in bytes, for a document to be considered for storage
213 <name>CacheMaxFileSize</name>
214 <description>The maximum size (in bytes) of a document to be placed in the
216 <syntax>CacheMaxFileSize <var>bytes</var></syntax>
217 <default>CacheMaxFileSize 1000000</default>
218 <contextlist><context>server config</context><context>virtual host</context>
222 <p>The <directive>CacheMaxFileSize</directive> directive sets the
223 maximum size, in bytes, for a document to be considered for storage in
227 CacheMaxFileSize 64000
233 <name>CacheTimeMargin</name>
234 <description>The minimum time margin to cache a document</description>
235 <syntax>CacheTimeMargin <var>?</var></syntax>
236 <default>CacheTimeMargin ?</default>
237 <contextlist><context>server config</context><context>virtual host</context>
241 <p>More detail will be added here, when the function is implemented.</p>
247 <note type="warning">
248 The <directive>CacheTimeMargin</directive> directive is currently
249 <em>not</em> implemented.
255 <name>CacheGcDaily</name>
256 <description>The recurring time each day for garbage collection to be run.
257 (24 hour clock)</description>
258 <syntax>CacheGcDaily <var>time</var></syntax>
259 <default>CacheGcDaily ?</default>
260 <contextlist><context>server config</context><context>virtual host</context>
264 <p>More detail will be added here, when the function is implemented.</p>
270 <note type="warning">
271 The <directive>CacheGcDaily</directive> directive is currently
272 <em>not</em> implemented.
278 <name>CacheGcUnused</name>
279 <description>The time to retain unreferenced cached files that match a
281 <syntax>CacheGcUnused <var>hours</var> <var>url-string</var></syntax>
282 <default>CacheGcUnused ?</default>
283 <contextlist><context>server config</context><context>virtual host</context>
287 <p>More detail will be added here, when the function is implemented.</p>
290 CacheGcUnused 12 /local_images
293 <note type="warning">
294 The <directive>CacheGcUnused</directive> directive is currently
295 <em>not</em> implemented.
301 <name>CacheGcClean</name>
302 <description>The time to retain unchanged cached files that match a
304 <syntax>CacheGcClean <var>hours</var> <var>url-string</var></syntax>
305 <default>CacheGcClean ?</default>
306 <contextlist><context>server config</context><context>virtual host</context>
310 <p>More detail will be added here, when the function is implemented.</p>
313 CacheGcClean 12 /daily_scripts
316 <note type="warning">
317 The <directive>CacheGcClean</directive> directive is currently
318 <em>not</em> implemented.
324 <name>CacheGcMemUsage</name>
325 <description>The maximum kilobytes of memory used for garbage
326 collection</description>
327 <syntax>CacheGcMemUsage <var>KBytes</var></syntax>
328 <default>CacheGcMemUsage ?</default>
329 <contextlist><context>server config</context><context>virtual host</context>
333 <p>More detail will be added here, when the function is implemented.</p>
339 <note type="warning">
340 The <directive>CacheGcMemUsage</directive> directive is currently
341 <em>not</em> implemented.