summaryrefslogtreecommitdiffstats
path: root/docs/manual/mod/mod_disk_cache.xml
blob: abfff4c44eda8712239aba3708fa64c520832d86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
<?xml version="1.0"?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
<!-- $Revision: 1.10 $ -->

<!--
 Copyright 2002-2004 The Apache Software Foundation

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<modulesynopsis metafile="mod_disk_cache.xml.meta">

<name>mod_disk_cache</name>
<description>Content cache storage manager keyed to URIs</description>
<status>Experimental</status>
<sourcefile>mod_disk_cache.c</sourcefile>
<identifier>disk_cache_module</identifier>

<summary>
    <note type="warning">
      This module is experimental. Documentation is still under development...
    </note>

    <p><module>mod_disk_cache</module> implements a disk based storage
    manager. It is primarily of use in conjunction with
    <module>mod_proxy</module>.</p>

    <p>Content is stored in and retrieved from the cache using URI based
    keys. Content with access protection is not cached.</p>

    <note><title>Note:</title>
      <p><module>mod_disk_cache</module> requires the services of
      <module>mod_cache</module>.</p>
    </note>
</summary>

<directivesynopsis>
<name>CacheRoot</name>
<description>The directory root under which cache files are
stored</description>
<syntax>CacheRoot <var>directory</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p>The <directive>CacheRoot</directive> directive defines the name of
    the directory on the disk to contain cache files. If the <module
    >mod_disk_cache</module> module has been loaded or compiled in to the
    Apache server, this directive <em>must</em> be defined. Failing to
    provide a value for <directive>CacheRoot</directive> will result in
    a configuration file processing error. The <directive
    module="mod_disk_cache">CacheDirLevels</directive> and <directive
    module="mod_disk_cache">CacheDirLength</directive> directives define
    the structure of the directories under the specified root directory.</p>

    <example>
      CacheRoot c:/cacheroot
    </example>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheSize</name>
<description>The maximum amount of disk space that will be used by the
cache in KBytes</description>
<syntax>CacheSize <var>KBytes</var></syntax>
<default>CacheSize 1000000</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p>The <directive>CacheSize</directive> directive sets the desired
    disk space usage of the cache, in KBytes (1024-byte units). This
    directive does not put a  hard limit on the size of the cache. The
    garbage collector will delete files until the usage is at or below the
    settings. Always use a value that is lower than the available disk
    space.</p>

    <example>
      CacheSize  5000000
    </example>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheGcInterval</name>
<description>The interval between garbage collection attempts.</description>
<syntax>CacheGcInterval <var>hours</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p>The <directive>CacheGcInterval</directive> directive specifies the
    number of hours to wait between attempts to free up disk space.</p>
    <p>More detail will be added here, when the function is implemented.</p>

    <example>
      CacheGcInterval  24<br />
    </example>

    <note type="warning">
      The <directive>CacheGcInterval</directive> directive is currently
      <em>not</em> implemented.
    </note>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheDirLevels</name>
<description>The number of levels of subdirectories in the
cache.</description>
<syntax>CacheDirLevels <var>levels</var></syntax>
<default>CacheDirLevels 3</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p>The <directive>CacheDirLevels</directive> directive sets the number
    of subdirectory levels in the cache. Cached data will be saved this
    many directory levels below the <directive module="mod_disk_cache"
    >CacheRoot</directive> directory.</p>

    <note>
      <p>The result of <directive>CacheDirLevels</directive>*
      <directive module="mod_disk_cache">CacheDirLength</directive> must
      not be higher than 20.</p>
    </note>

    <example>
      CacheDirLevels  5
    </example>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheDirLength</name>
<description>The number of characters in subdirectory names</description>
<syntax>CacheDirLength <var>length</var></syntax>
<default>CacheDirLength 2</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p>The <directive>CacheDirLength</directive> directive sets the number
    of characters for each subdirectory name in the cache hierarchy.</p>

    <note>
      <p>The result of <directive module="mod_disk_cache"
      >CacheDirLevels</directive>* <directive>CacheDirLength</directive>
      must not be higher than 20.</p>
    </note>

    <example>
      CacheDirLength  4
    </example>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheExpiryCheck</name>
<description>Indicates if the cache observes Expires dates when seeking
files</description>
<syntax>CacheExpiryCheck On|Off</syntax>
<default>CacheExpiryCheck On</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p>More detail will be added here, when the function is implemented.</p>

    <example>
      CacheExpiryCheck Off<br />
    </example>

    <note type="warning">
      The <directive>CacheExpiryCheck</directive> directive is currently
      <em>not</em> implemented.
    </note>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheMinFileSize</name>
<description>The minimum size (in bytes) of a document to be placed in the
cache</description>
<syntax>CacheMinFileSize <var>bytes</var></syntax>
<default>CacheMinFileSize 1</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p>The <directive>CacheMinFileSize</directive> directive sets the
    minimum size, in bytes, for a document to be considered for storage
    in the cache.</p>

    <example>
      CacheMinFileSize 64
    </example>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheMaxFileSize</name>
<description>The maximum size (in bytes) of a document to be placed in the
cache</description>
<syntax>CacheMaxFileSize <var>bytes</var></syntax>
<default>CacheMaxFileSize 1000000</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p>The <directive>CacheMaxFileSize</directive> directive sets the
    maximum size, in bytes, for a document to be considered for storage in
    the cache.</p>

    <example>
      CacheMaxFileSize 64000
    </example>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheTimeMargin</name>
<description>The minimum time margin to cache a document</description>
<syntax>CacheTimeMargin <var>?</var></syntax>
<default>CacheTimeMargin ?</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p>More detail will be added here, when the function is implemented.</p>

    <example>
      CacheTimeMargin X
    </example>

    <note type="warning">
      The <directive>CacheTimeMargin</directive> directive is currently
      <em>not</em> implemented.
    </note>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheGcDaily</name>
<description>The recurring time each day for garbage collection to be run.
(24 hour clock)</description>
<syntax>CacheGcDaily <var>time</var></syntax>
<default>CacheGcDaily ?</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p>More detail will be added here, when the function is implemented.</p>

    <example>
      CacheGcDaily 23:59
    </example>

    <note type="warning">
      The <directive>CacheGcDaily</directive> directive is currently
      <em>not</em> implemented.
    </note>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheGcUnused</name>
<description>The time to retain unreferenced cached files that match a
URL.</description>
<syntax>CacheGcUnused <var>hours</var> <var>url-string</var></syntax>
<default>CacheGcUnused ?</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p>More detail will be added here, when the function is implemented.</p>

    <example>
      CacheGcUnused 12 /local_images
    </example>

    <note type="warning">
      The <directive>CacheGcUnused</directive> directive is currently
      <em>not</em> implemented.
    </note>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheGcClean</name>
<description>The time to retain unchanged cached files that match a
URL</description>
<syntax>CacheGcClean <var>hours</var> <var>url-string</var></syntax>
<default>CacheGcClean ?</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p>More detail will be added here, when the function is implemented.</p>

    <example>
      CacheGcClean 12 /daily_scripts
    </example>

    <note type="warning">
      The <directive>CacheGcClean</directive> directive is currently
      <em>not</em> implemented.
    </note>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheGcMemUsage</name>
<description>The maximum kilobytes of memory used for garbage
collection</description>
<syntax>CacheGcMemUsage <var>KBytes</var></syntax>
<default>CacheGcMemUsage ?</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p>More detail will be added here, when the function is implemented.</p>

    <example>
      CacheGcMemUsage 16
    </example>

    <note type="warning">
      The <directive>CacheGcMemUsage</directive> directive is currently
      <em>not</em> implemented.
    </note>
</usage>
</directivesynopsis>

</modulesynopsis>