1 <?xml version="1.0" encoding="iso-2022-jp"?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
4 <!-- English Revision: 125573:149492 (outdated) -->
7 Copyright 2004-2005 The Apache Software Foundation or its licensors,
10 Licensed under the Apache License, Version 2.0 (the "License");
11 you may not use this file except in compliance with the License.
12 You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <modulesynopsis metafile="mod_cache.xml.meta">
25 <name>mod_cache</name>
26 <description>URI
\e$B$r%-!<$K$7$?%3%s%F%s%D$N%-%c%C%7%e
\e(B</description>
27 <status>Extension</status>
28 <sourcefile>mod_cache.c</sourcefile>
29 <identifier>cache_module</identifier>
33 \e$B$3$l$O<B83E*$J%b%8%e!<%k$G$9!#J8=q$b$^$@3+H/Cf$G$9
\e(B...
36 <p><module>mod_cache</module>
\e$B$O%m!<%+%k$N%3%s%F%s%D$d%W%m%-%7$5$l$?
\e(B
37 \e$B%3%s%F%s%D$r%-%c%C%7%e$9$k$?$a$K;H$o$l$k
\e(B <a
38 href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>
\e$B=`5r$N
\e(B
39 HTTP
\e$B%3%s%F%s%D%-%c%C%7%e$r<BAu$7$F$$$^$9!#
\e(B<module>mod_cache</module>
40 \e$B$NF0:n$K$O%9%H%l!<%8$r4IM}$9$k%b%8%e!<%k$,I,MW$G$9!#I8=`
\e(B
41 Apache
\e$BG[I[$K$OFs$D%9%H%l!<%84IM}%b%8%e!<%k$,4^$^$l$F$$$^$9
\e(B:</p>
44 <dt><module>mod_disk_cache</module></dt>
45 <dd>
\e$B%G%#%9%/$r;HMQ$7$?%9%H%l!<%84IM}5!9=$r<BAu$7$F$$$^$9!#
\e(B</dd>
47 <dt><module>mod_mem_cache</module></dt>
48 <dd>
\e$B%a%b%j$r;HMQ$7$?%9%H%l!<%84IM}5!9=$r<BAu$7$F$$$^$9!#
\e(B
49 <module>mod_mem_cache</module>
\e$B$O<!$NFs$D$N%b!<%I$N$I$A$i$+$GF0:n$9$k
\e(B
50 \e$B$h$&$K@_Dj$G$-$^$9
\e(B:
\e$B%*!<%W%s$5$l$F$$$k%U%!%$%k5-=R;R$r%-%c%C%7%e$9$k%b!<%I$+!"
\e(B
51 \e$B%R!<%W>e$G$N%*%V%8%'%/%H$N<+BN$r%-%c%C%7%e$r$9$k%b!<%I$G$9!#
\e(B
52 <module>mod_mem_cache</module>
\e$B$O%m!<%+%k$G@8@.$5$l$k%3%s%F%s%D$d!"
\e(B
53 <module>mod_proxy</module>
\e$B$,
\e(B
54 <directive module="mod_proxy">ProxyPass</directive>
\e$B$r;H$C$F@_Dj$5$l$F$$$k
\e(B
55 \e$B$H$-$N
\e(B (
\e$B$D$^$j
\e(B<dfn>
\e$B%j%P!<%9%W%m%-%7
\e(B</dfn>
\e$B$G$N
\e(B)
\e$B%P%C%/%(%s%I%5!<%P$N
\e(B
56 \e$B%3%s%F%s%D$r%-%c%C%7%e$9$k$N$K;H$($^$9!#
\e(B</dd>
59 <p>
\e$B%3%s%F%s%D$N%-%c%C%7%e$X$NJ]B8$H<hF@$O
\e(B URI
\e$B$K4p$E$$$?%-!<$,;H$o$l$^$9!#
\e(B
60 \e$B%"%/%;%9J]8n$N$+$1$i$l$F$$$k%3%s%F%s%D$O%-%c%C%7%e$5$l$^$;$s!#
\e(B</p>
63 <section id="related"><title>
\e$B4XO"%b%8%e!<%k$H%G%#%l%/%F%#%V
\e(B</title>
66 <module>mod_disk_cache</module>
67 <module>mod_mem_cache</module>
70 <directive module="mod_disk_cache">CacheRoot</directive>
71 <directive module="mod_disk_cache">CacheSize</directive>
72 <directive module="mod_disk_cache">CacheDirLevels</directive>
73 <directive module="mod_disk_cache">CacheDirLength</directive>
74 <directive module="mod_disk_cache">CacheMinFileSize</directive>
75 <directive module="mod_disk_cache">CacheMaxFileSize</directive>
76 <directive module="mod_mem_cache">MCacheSize</directive>
77 <directive module="mod_mem_cache">MCacheMaxObjectCount</directive>
78 <directive module="mod_mem_cache">MCacheMinObjectSize</directive>
79 <directive module="mod_mem_cache">MCacheMaxObjectSize</directive>
80 <directive module="mod_mem_cache">MCacheRemovalAlgorithm</directive>
81 <directive module="mod_mem_cache">MCacheMaxStreamingBuffer</directive>
86 <section id="sampleconf"><title>
\e$B%5%s%W%k@_Dj
\e(B</title>
87 <example><title>Sample httpd.conf</title>
89 # Sample Cache Configuration<br />
91 LoadModule cache_module modules/mod_cache.so<br />
93 <IfModule mod_cache.c><br />
95 #LoadModule disk_cache_module modules/mod_disk_cache.so<br />
96 # If you want to use mod_disk_cache instead of mod_mem_cache,
97 # uncomment the line above and comment out the LoadModule line below.
98 <IfModule mod_disk_cache.c><br />
100 CacheRoot c:/cacheroot<br />
101 CacheEnable disk /<br />
102 CacheDirLevels 5<br />
103 CacheDirLength 3<br />
105 </IfModule> <br />
107 LoadModule mem_cache_module modules/mod_mem_cache.so<br />
108 <IfModule mod_mem_cache.c><br />
110 CacheEnable mem /<br />
111 MCacheSize 4096<br />
112 MCacheMaxObjectCount 100<br />
113 MCacheMinObjectSize 1<br />
114 MCacheMaxObjectSize 2048<br />
116 </IfModule><br />
123 <name>CacheEnable</name>
124 <description>
\e$B;XDj$7$?%9%H%l!<%84IM}J}<0$r;H$C$F$N%-%c%C%7%e$rM-8z$K$9$k
\e(B</description>
125 <syntax>CacheEnable <var>cache_type</var> <var>url-string</var></syntax>
126 <contextlist><context>server config</context><context>virtual host</context>
130 <p><directive>CacheEnable</directive>
\e$B%G%#%l%/%F%#%V$G
\e(B <module>mod_cache</module>
131 \e$B%b%8%e!<%k$,
\e(B <var>url-string</var>
\e$B0J2<$N
\e(B URL
\e$B$r%-%c%C%7%e$9$k$h$&$K$7$^$9!#
\e(B
132 \e$B%-%c%C%7%e%9%H%l!<%84IM}J}<0$O
\e(B <var>cache_type</var>
\e$B0z?t$G;XDj$7$^$9!#
\e(B
133 <var>cache_type</var> <code> mem</code>
\e$B$G!"
\e(B
134 <module>mod_mem_cache</module>
\e$B$G<BAu$5$l$F$$$k%a%b%j$r;H$C$?%9%H%l!<%8
\e(B
135 \e$B4IM}J}<0$r;H$&$h$&$K
\e(B <module>mod_cache</module>
\e$B$K;X<($7$^$9!#
\e(B
136 <var>cache_type</var> <code>disk</code>
\e$B$G!"
\e(B
137 <module>mod_disk_cache</module>
\e$B$G<BAu$5$l$F$$$k%G%#%9%/$r;H$C$?%9%H%l!<%8
\e(B
138 \e$B4IM}$r;H$&$h$&$K
\e(B <module>mod_cache</module>
\e$B$K;X<($7$^$9!#
\e(B
139 <var>cache_type</var> <code>fd</code>
\e$B$O
\e(B <module>mod_cache</module>
\e$B$K
\e(B
140 <module>mod_mem_cache</module>
\e$B$K$h$j<BAu$5$l$F$$$k%U%!%$%k5-=R;R$N
\e(B
141 \e$B%-%c%C%7%e$r;H$&$h$&$K;X<($7$^$9!#
\e(B</p>
143 <p>(
\e$B2<$NNc$N$h$&$K
\e(B) <directive>CacheEnable</directive>
\e$B%G%#%l%/%F%#%V$N
\e(B
144 URL
\e$B6u4V$,=EJ#$7$F$$$k$H$-$O!"3:Ev$9$k%9%H%l!<%8J}<0$r=g$K;n$7$F!"
\e(B
145 \e$B<B:]$K%j%/%(%9%H$N=hM}$,$G$-$k$H!"$=$NJ}<0$G=hM}$7$^$9!#
\e(B
146 \e$B%9%H%l!<%84IM}J}<0$,<B9T$5$l$k=gHV$O@_Dj%U%!%$%kCf$N
\e(B
147 <directive>CacheEnable</directive>
\e$B$N=gHV$K$h$j7hDj$5$l$^$9!#
\e(B</p>
150 CacheEnable mem /manual<br />
151 CacheEnable fd /images<br />
152 CacheEnable disk /<br />
158 <name>CacheDisable</name>
159 <description>
\e$BFCDj$N
\e(B URL
\e$B$r%-%c%C%7%e$7$J$$
\e(B</description>
160 <syntax>CacheDisable <var> url-string</var></syntax>
161 <contextlist><context>server config</context><context>virtual host</context>
165 <p><directive>CacheDisable</directive>
\e$B%G%#%l%/%F%#%V$G
\e(B
166 <module>mod_cache</module>
\e$B%b%8%e!<%k$,
\e(B <var>url-string</var>
\e$B0J2<$N
\e(B
167 URL
\e$B$r%-%c%C%7%e
\e(B<em>
\e$B$7$J$$
\e(B</em>
\e$B$h$&$K$7$^$9!#
\e(B</p>
169 <example><title>
\e$BNc
\e(B</title>
170 CacheDisable /local_files
176 <name>CacheMaxExpire</name>
177 <description>
\e$B%I%-%e%a%s%H$r%-%c%C%7%e$9$k:GBg;~4V$rIC?t$G8=$7$?$b$N
\e(B</description>
178 <syntax>CacheMaxExpire <var>seconds</var></syntax>
179 <default>CacheMaxExpire 86400 (
\e$B0lF|
\e(B)</default>
180 <contextlist><context>server config</context><context>virtual host</context>
184 <p><directive>CacheMaxExpire</directive>
\e$B%G%#%l%/%F%#%V$O!"
\e(B
185 \e$B%-%c%C%7%e$9$k
\e(B HTTP
\e$B%I%-%e%a%s%H$r!"85$N%5!<%P$KLd$$9g$o$;$J$$$^$^:GBg2?IC
\e(B
186 \e$BJ];}$7$F$b$h$$$+$r;XDj$7$^$9!#$D$^$j!"%I%-%e%a%s%H$O:GBg$G$3$NIC?t4V$V$s8E$/
\e(B
187 \e$B$J$k$3$H$K$J$j$^$9!#$3$N:GBgCM$O!"
\e(B(
\e$BLuCm
\e(B:
\e$B%l%9%]%s%9Cf$G
\e(B)
\e$B%I%-%e%a%s%H$H6&$K
\e(B
188 \e$B%I%-%e%a%s%H$N4|F|$,Ds6!$5$l$F$$$k>l9g$G$bE,MQ$5$l$^$9!#
\e(B</p>
191 CacheMaxExpire 604800
197 <name>CacheDefaultExpire</name>
198 <description>
\e$B4|F|$,;XDj$5$l$F$$$J$$$H$-$K%I%-%e%a%s%H$r%-%c%C%7%e$9$k%G%U%)%k%H$N4|4V
\e(B</description>
199 <syntax>CacheDefaultExpire <var>seconds</var></syntax>
200 <default>CacheDefaultExpire 3600 (1
\e$B;~4V
\e(B)</default>
201 <contextlist><context>server config</context><context>virtual host</context>
205 <p><directive>CacheDefaultExpire</directive>
\e$B%G%#%l%/%F%#%V$O!"%I%-%e%a%s%H$K
\e(B
206 \e$BM-8z4|8B
\e(B (expiry)
\e$B$d:G=*=$@5;~9o
\e(B (last-modified)
\e$B$,;XDj$5$l$F$$$J$$>l9g$N
\e(B
207 \e$B%G%U%)%k%H$N;~4V$r;XDj$7$^$9!#
\e(B<directive>CacheMaxExpire</directive>
208 \e$B%G%#%l%/%F%#%V$G;XDj$5$l$?CM$O$3$N@_Dj$r>e=q$-
\e(B<em>
\e$B$7$^$;$s
\e(B</em>
\e$B!#
\e(B</p>
211 CacheDefaultExpire 86400
217 <name>CacheIgnoreNoLastMod</name>
218 <description>
\e$B1~Ez$K
\e(B Last Modified
\e$B$,L5$/$F$b5$$K$7$J$$$h$&$K$9$k
\e(B</description>
219 <syntax>CacheIgnoreNoLastMod On|Off</syntax>
220 <default>CacheIgnoreNoLastMod Off</default>
221 <contextlist><context>server config</context><context>virtual host</context>
225 <p>
\e$BDL>o!"
\e(BLast-Modified
\e$B$K$h$k:G=*=$@5;~9o$NL5$$%I%-%e%a%s%H$O%-%c%C%7%e
\e(B
226 \e$B$5$l$^$;$s!#
\e(B(
\e$BNc$($P
\e(B <module>mod_include</module>
\e$B$K$h$k=hM}$N$H$-$J$I$K
\e(B)
227 Last-Modified
\e$B;~9o$,>C5n$5$l$?$j!"$=$b$=$b:G=i$+$iDs6!$5$l$F$$$J$$
\e(B
228 \e$B>u67$,$"$j$^$9!#
\e(B<directive>CacheIgnoreNoLastMod</directive>
229 \e$B%G%#%l%/%F%#%V$r;H$&$H!"
\e(BLast-Modified
\e$BF|;~$,;XDj$5$l$F$$$J$$
\e(B
230 \e$B%I%-%e%a%s%H$G$b%-%c%C%7%e$9$k$h$&$K;XDj$G$-$^$9!#%I%-%e%a%s%H$K
\e(B
231 \e$B:G=*=$@5;~9o
\e(B (Last-Modified)
\e$BM-8z4|8B
\e(B (expiry)
\e$B$,$J$$>l9g$O!"M-8z4|8B$N
\e(B
232 \e$B@8@.$K
\e(B <directive>CacheDefaultExpire</directive>
\e$B$,;H$o$l$^$9!#
\e(B</p>
235 CacheIgnoreNoLastMod On
241 <name>CacheIgnoreCacheControl</name>
242 <description>
\e$B%/%i%$%"%s%H$,%3%s%F%s%D$r%-%c%C%7%e$7$J$$$h$&$K;X<($7$F$bL5;k$9$k!#
\e(B</description>
243 <syntax>CacheIgnoreCacheControl On|Off</syntax>
244 <default>CacheIgnoreCacheControl Off</default>
245 <contextlist><context>server config</context><context>virtual host</context>
249 <p>no-cache
\e$B%X%C%@$d
\e(B no-store
\e$B%X%C%@$N$"$k%I%-%e%a%s%H$ODL>o%-%c%C%7%e
\e(B
250 \e$B$5$l$^$;$s!#
\e(B<directive>CacheIgnoreCacheControl</directive>
\e$B%G%#%l%/%F%#%V
\e(B
251 \e$B$G$3$NF0:n$r>e=q$-$G$-$k$h$&$K$J$j$^$9!#
\e(B
252 <directive>CacheIgnoreCacheControl</directive> On
\e$B$H$9$k$H%5!<%P$K
\e(B
253 \e$B%I%-%e%a%s%H$K
\e(B no-cache
\e$B$d
\e(B no-store
\e$B%X%C%@$,$"$C$?$H$7$F$b%I%-%e%a%s%H$r
\e(B
254 \e$B%-%c%C%7%e$9$k$h$&$K;X<($7$^$9!#G'>Z$rI,MW$H$9$k%I%-%e%a%s%H$O
\e(B<em>
\e$B7h$7$F
\e(B</em>
255 \e$B%-%c%C%7%e$5$l$^$;$s!#
\e(B</p>
258 CacheIgnoreCacheControl On
264 <name>CacheLastModifiedFactor</name>
265 <description>LastModified
\e$B$NF|IU$K4p$E$$$FM-8z4|8B
\e(B (expiry)
266 \e$B$r7W;;$9$k$?$a$N=E$_$r;XDj$9$k
\e(B
268 <syntax>CacheLastModifiedFactor <var>float</var></syntax>
269 <default>CacheLastModifiedFactor 0.1</default>
270 <contextlist><context>server config</context><context>virtual host</context>
274 <p>
\e$B%I%-%e%a%s%H$K
\e(B Last-Modified
\e$B$NF|IU$,L5$$$1$l$I$bM-8z4|8B
\e(B (expiry)
275 \e$B$NF|IU$,$"$k$H$$$&$H$-$K!"M-8z4|8B$r:G=*=$@5;~9o$+$i$N7P2a;~4V$H$7$F
\e(B
276 \e$B7W;;$9$k$h$&$K$G$-$^$9!#M-8z4|8B$r<!$N7W;;<0$K=>$C$F@8@.$9$k$N$G$9$,!"
\e(B
277 \e$B$=$N$H$-$K;H$o$l$k
\e(B <var>factor</var>
\e$B$r
\e(B
278 <directive>CacheLastModifiedFactor</directive>
\e$B%G%#%l%/%F%#%V$G;XDj$7$^$9!#
\e(B
281 <p><code>expiry-period = time-since-last-modified-date * <var>factor</var>
282 expiry-date = current-date + expiry-period</code></p>
284 <p>
\e$BNc$($P!"%I%-%e%a%s%H$,
\e(B 10
\e$B;~4VA0$K:G8e$K=$@5$5$l$F$$$F!"
\e(B
285 <var>factor</var>
\e$B$,
\e(B 0.1
\e$B$G$"$l$P!"4|F|$O
\e(B 10*0.1 = 1
\e$B;~4V$K
\e(B
286 \e$B@_Dj$5$l$^$9!#8=:_;~9o$,
\e(B 3:00pm
\e$B$G$"$l$P!"7W;;$5$l$?4|F|$O
\e(B
287 3:00pm + 1hour = 4:00pm
\e$B$K$J$j$^$9!#
\e(B</p>
289 <p>
\e$B4|F|$,
\e(B <directive>CacheMaxExpire</directive>
\e$B$G@_Dj$5$l$F$$$kCM
\e(B
290 \e$B$h$jBg$-$/$J$C$F$7$^$C$F$$$k>l9g$O!"
\e(B<directive>CacheMaxExpire</directive>
291 \e$B$N@_DjCM$,M%@h$5$l$^$9!#
\e(B</p>
294 CacheLastModifiedFactor 0.5
300 <name>CacheIgnoreHeaders</name>
301 <description>
\e$B;XDj$5$l$?
\e(B HTTP
\e$B%X%C%@$r%-%c%C%7%e$KJ]B8$7$J$$!#
\e(B
303 <syntax>CacheIgnoreHeaders <var>header-string</var> [<var>header-string</var>] ...</syntax>
304 <default>CacheIgnoreHeaders None</default>
305 <contextlist><context>server config</context><context>virtual host</context>
309 <p>RFC 2616
\e$B$K$h$k$H!"
\e(Bhop-by-hop HTTP
\e$B%X%C%@$O%-%c%C%7%e$K$OJ]4I$5$l$^$;$s!#
\e(B
310 \e$B0J2<$N%X%C%@$O
\e(B hop-by-hop
\e$B%X%C%@$K3:Ev$7$^$9$N$G!"
\e(B
311 <directive>CacheIgnoreHeaders</directive>
312 \e$B$N@_Dj$K
\e(B<em>
\e$B4X78$J$/
\e(B</em>
\e$B%-%c%C%7%e$K$OJ]4I$5$l$^$;$s
\e(B:</p>
314 <li><code>Connection</code></li>
315 <li><code>Keep-Alive</code></li>
316 <li><code>Proxy-Authenticate</code></li>
317 <li><code>Proxy-Authorization</code></li>
318 <li><code>TE</code></li>
319 <li><code>Trailers</code></li>
320 <li><code>Transfer-Encoding</code></li>
321 <li><code>Upgrade</code></li>
324 <p><directive>CacheIgnoreHeaders</directive>
\e$B$G
\e(B
325 \e$B%-%c%C%7%e$KJ]4I$7$J$$DI2C$N
\e(B HTTP
\e$B%X%C%@$r;XDj$7$^$9!#
\e(B
326 \e$BNc$($P!"%/%C%-!<$r%-%c%C%7%e$KJ]4I$7$J$$$h$&$K$7$?J}$,$h$$>l9g$b
\e(B
327 \e$B$"$k$G$7$g$&!#
\e(B</p>
329 <p><directive>CacheIgnoreHeaders</directive>
\e$B$N0z?t$O!"
\e(B
330 \e$B%-%c%C%7%e$KJ]4I$7$J$$
\e(B HTTP
\e$B%X%C%@$r6uGr6h@Z$j$K$7$?%j%9%H7A<0$G$9!#
\e(B
331 \e$B%-%c%C%7%e$KJ]4I$7$J$$%X%C%@$,
\e(B hop-by-hop
\e$B%X%C%@$@$1$N>l9g
\e(B
332 (RFC 2616
\e$B=`5r$NF0:n$N$H$-
\e(B)
\e$B$O!"
\e(B
333 <directive>CacheIgnoreHeaders</directive>
\e$B$r
\e(B <code>None</code>
334 \e$B$K@_Dj$G$-$^$9!#
\e(B</p>
336 <example><title>
\e$BNc
\e(B 1</title>
337 CacheIgnoreHeaders Set-Cookie
340 <example><title>
\e$BNc
\e(B 2</title>
341 CacheIgnoreHeaders None
344 <note type="warning"><title>
\e$B7Y9p
\e(B:</title>
345 <code>Expires</code>
\e$B$N$h$&$JE,@Z$N%-%c%C%7%e4IM}$N$?$a$KI,MW$J
\e(B
346 \e$B%X%C%@$,
\e(B <directive>CacheIgnoreHeaders</directive>
\e$B$N@_Dj$K$h$j
\e(B
347 \e$BJ]4I$5$l$F$$$J$$$H$-$O!"
\e(Bmod_cache
\e$B$NF0:n$ODj5A$5$l$F$$$^$;$s!#
\e(B