1 <?xml version="1.0" encoding="EUC-KR" ?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
4 <!-- English Revision: 1.17 -->
7 Copyright 2003-2004 The Apache Software Foundation
9 Licensed under the Apache License, Version 2.0 (the "License");
10 you may not use this file except in compliance with the License.
11 You may obtain a copy of the License at
13 http://www.apache.org/licenses/LICENSE-2.0
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
22 <modulesynopsis metafile="mod_cache.xml.meta">
24 <name>mod_cache</name>
25 <description>Content cache keyed to URIs.</description>
26 <status>Experimental</status>
27 <sourcefile>mod_cache.c</sourcefile>
28 <identifier>cache_module</identifier>
32 ÀÌ ¸ðµâÀº ½ÇÇèÀûÀÎ »óÅÂÀÌ´Ù. ¹®¼´Â ¾ÆÁ÷ ÀÛ¾÷ÁßÀÌ´Ù...
35 <p><module>mod_cache</module>´Â °°Àº ÄÄÇ»ÅÍ¿¡ ÀÖ´Â ³»¿ëÀ̳ª
36 ÇÁ·Ï½ÃµÈ ³»¿ëÀ» ij½¬ÇÒ ¼ö ÀÖ´Â <a
37 href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>
38 ȣȯ HTTP ³»¿ëij½¬¸¦ ±¸ÇöÇÑ´Ù. <module>mod_cache</module>¸¦
39 »ç¿ëÇÏ·Á¸é ÀúÀå°ü¸®¸ðµâ(storage management module)ÀÌ ÇÊ¿äÇÏ´Ù.
40 ±âº» ¾ÆÆÄÄ¡ ¹èÆ÷º»¿¡´Â µÎ°¡Áö ÀúÀå°ü¸®¸ðµâÀÌ ÀÖ´Ù:</p>
42 <dt><module>mod_disk_cache</module></dt>
43 <dd>´Â µð½ºÅ©±â¹Ý ÀúÀå°ü¸®ÀÚ¸¦ ±¸ÇöÇÑ´Ù.</dd>
45 <dt><module>mod_mem_cache</module></dt>
46 <dd>´Â ¸Þ¸ð¸®±â¹Ý ÀúÀå°ü¸®ÀÚ¸¦ ±¸ÇöÇÑ´Ù.
47 <module>mod_mem_cache</module>´Â ÆÄÀϱâ¼úÀÚ¸¦ ij½¬Çϰųª
48 Èü(heap) °ø°£¿¡ °´Ã¼¸¦ ij½¬ÇÏ´Â µÎ°¡Áö ¹æ½ÄÁß ÇÑ°¡Áö ¹æ¹ýÀ¸·Î
49 µ¿ÀÛÇϵµ·Ï ¼³Á¤ÇÒ ¼ö ÀÖ´Ù. <module>mod_mem_cache</module>´Â
50 ÀÚ½ÅÀÌ »ý¼ºÇÑ ³»¿ëÀ» ij½¬Çϰųª, (<dfn>¿ªÇÁ·Ï½Ã(reverse proxy)</dfn>·Î
51 ¾Ë·ÁÁø) <directive module="mod_proxy">ProxyPass</directive>¸¦
52 »ç¿ëÇÏ¿© <module>mod_proxy</module>¸¦ À§ÇØ µÞ´Ü ¼¹ö³»¿ëÀ»
56 <p>³»¿ëÀ» URI¸¦ Åä´ë·Î ¸¸µç Å°·Î ij½¬¿¡ ÀúÀåÇÏ°í °¡Á®¿Â´Ù.
57 Á¢±Ùº¸È£°¡ µÈ ³»¿ëÀº ij½¬ÇÏÁö¾Ê´Â´Ù.</p>
60 <section id="related"><title>°ü·ÃµÈ ¸ðµâ°ú Áö½Ã¾î</title>
63 <module>mod_disk_cache</module>
64 <module>mod_mem_cache</module>
67 <directive module="mod_disk_cache">CacheRoot</directive>
68 <directive module="mod_disk_cache">CacheSize</directive>
69 <directive module="mod_disk_cache">CacheGcInterval</directive>
70 <directive module="mod_disk_cache">CacheDirLevels</directive>
71 <directive module="mod_disk_cache">CacheDirLength</directive>
72 <directive module="mod_disk_cache">CacheExpiryCheck</directive>
73 <directive module="mod_disk_cache">CacheMinFileSize</directive>
74 <directive module="mod_disk_cache">CacheMaxFileSize</directive>
75 <directive module="mod_disk_cache">CacheTimeMargin</directive>
76 <directive module="mod_disk_cache">CacheGcDaily</directive>
77 <directive module="mod_disk_cache">CacheGcUnused</directive>
78 <directive module="mod_disk_cache">CacheGcClean</directive>
79 <directive module="mod_disk_cache">CacheGcMemUsage</directive>
80 <directive module="mod_mem_cache">MCacheSize</directive>
81 <directive module="mod_mem_cache">MCacheMaxObjectCount</directive>
82 <directive module="mod_mem_cache">MCacheMinObjectSize</directive>
83 <directive module="mod_mem_cache">MCacheMaxObjectSize</directive>
84 <directive module="mod_mem_cache">MCacheRemovalAlgorithm</directive>
85 <directive module="mod_mem_cache">MCacheMaxStreamingBuffer</directive>
90 <section id="sampleconf"><title>¼³Á¤¿¹</title>
91 <example><title>Sample httpd.conf</title>
93 # ¿¹Á¦ ij½¬ ¼³Á¤<br />
95 LoadModule cache_module modules/mod_cache.so<br />
97 <IfModule mod_cache.c><br />
99 #LoadModule disk_cache_module modules/mod_disk_cache.so<br />
100 <IfModule mod_disk_cache.c><br />
102 CacheRoot c:/cacheroot<br />
104 CacheEnable disk /<br />
105 CacheDirLevels 5<br />
106 CacheDirLength 3<br />
108 </IfModule> <br />
110 LoadModule mem_cache_module modules/mod_mem_cache.so<br />
111 <IfModule mod_mem_cache.c><br />
113 CacheEnable mem /<br />
114 MCacheSize 4096<br />
115 MCacheMaxObjectCount 100<br />
116 MCacheMinObjectSize 1<br />
117 MCacheMaxObjectSize 2048<br />
119 </IfModule><br />
126 <name>CacheEnable</name>
127 <description>ÁöÁ¤ÇÑ ÀúÀå°ü¸®ÀÚ¸¦ »ç¿ëÇÏ¿© ÁöÁ¤ÇÑ URLÀ» ij½¬ÇÑ´Ù</description>
128 <syntax>CacheEnable <var>cache_type</var> <var>url-string</var></syntax>
129 <contextlist><context>server config</context><context>virtual host</context>
133 <p><directive>CacheEnable</directive> Áö½Ã¾î¸¦ »ç¿ëÇϸé
134 <module>mod_cache</module>°¡ <var>url-string</var> ÀÌÇÏ
135 urlµéÀ» ij½¬ÇÑ´Ù. ij½¬ ÀúÀå°ü¸®ÀÚ´Â <var>cache_type</var>
136 ¾Æ±Ô¸ÕÆ®·Î ÁöÁ¤ÇÑ´Ù. <var>cache_type</var> <code>mem</code>Àº
137 <module>mod_mem_cache</module>°¡ ±¸ÇöÇÏ´Â ¸Þ¸ð¸®±â¹Ý
138 ÀúÀå°ü¸®ÀÚ¸¦ »ç¿ëÇÑ´Ù. <var>cache_type</var> <code>disk</code>´Â
139 <module>mod_disk_cache</module>°¡ ±¸ÇöÇÏ´Â µð½ºÅ©±â¹Ý
140 ÀúÀå°ü¸®ÀÚ¸¦ »ç¿ëÇÑ´Ù. <var>cache_type</var> <code>fd</code>´Â
141 <module>mod_mem_cache</module>°¡ ±¸ÇöÇÏ´Â ÆÄÀϱâ¼úÀÚ Ä³½¬¸¦
143 <p>(¾Æ·¡ ¿¹¿Í °°ÀÌ) URL °ø°£ÀÌ ´Ù¸¥
144 <directive>CacheEnable</directive> Áö½Ã¾î¿Í °ãÄ¡¸é ½ÇÁ¦·Î
145 ÇÑ ÀúÀå°ü¸®ÀÚ°¡ ¿äûÀ» ó¸®ÇÒ¶§±îÁö µÎ ÀúÀå°ü¸®ÀÚ¸¦ ¸ðµÎ
146 ½ÇÇàÇÑ´Ù. ¼³Á¤ÆÄÀÏ¿¡¼ <directive>CacheEnable</directive>
147 Áö½Ã¾îÀÇ ¼ø¼´ë·Î ÀúÀå°ü¸®ÀÚ°¡ ½ÇÇàµÈ´Ù.</p>
150 CacheEnable mem /manual<br />
151 CacheEnable fd /images<br />
152 CacheEnable disk /<br />
158 <name>CacheDisable</name>
159 <description>ƯÁ¤ URLÀ» ij½¬ÇÏÁö ¾Ê´Â´Ù</description>
160 <syntax>CacheDisable <var> url-string</var></syntax>
161 <contextlist><context>server config</context><context>virtual host</context>
165 <p><directive>CacheDisable</directive> Áö½Ã¾î¸¦ »ç¿ëÇϸé
166 <module>mod_cache</module>°¡ <var>url-string</var> ÀÌÇÏÀÇ
167 urlµéÀ» ij½¬ÇÏÁö <em>¾Ê´Â´Ù</em>.</p>
169 <example><title>¿¹Á¦</title>
170 CacheDisable /local_files
176 <name>CacheMaxExpire</name>
177 <description>¹®¼¸¦ ij½¬ÇÏ´Â ÃÊ´ÜÀ§ ÃÖ´ë½Ã°£</description>
178 <syntax>CacheMaxExpire <var>seconds</var></syntax>
179 <default>CacheMaxExpire 86400 (ÇÏ·ç)</default>
180 <contextlist><context>server config</context><context>virtual host</context>
184 <p><directive>CacheMaxExpire</directive> Áö½Ã¾î´Â ½ÇÁ¦ ¼¹ö¸¦
185 °Ë»çÇÏÁö¾Ê°í ij½¬°¡´ÉÇÑ HTTP ¹®¼¸¦ À¯ÁöÇÒ ¼ö ÀÖ´Â ÃÊ´ÜÀ§
186 ÃÖ´ë½Ã°£À» ÁöÁ¤ÇÑ´Ù. Áï, ¹®¼´Â ÃÖ´ëÇÑ ÀÌ ¼³Á¤°ª¸¸Å ¿À·¡µÇ¾ú´Ù.
187 ¹®¼°¡ ¸¸±â½Ã°£À» ÁöÁ¤ÇÏ¿©µµ ÀÌ ÃÖ´ë°ªÀ» ÁöŲ´Ù.</p>
190 CacheMaxExpire 604800
196 <name>CacheDefaultExpire</name>
197 <description>¸¸±â½Ã°£À» ÁöÁ¤ÇÏÁö¾ÊÀº ¹®¼¸¦ ij½¬ÇÒ ±âº» ±â°£.</description>
198 <syntax>CacheDefaultExpire <var>seconds</var></syntax>
199 <default>CacheDefaultExpire 3600 (one hour)</default>
200 <contextlist><context>server config</context><context>virtual host</context>
204 <p><directive>CacheDefaultExpire</directive> Áö½Ã¾î´Â ¹®¼ÀÇ
205 ¸¸±â½Ã°£°ú ÃÖ±Ù¼öÁ¤½Ã°£ÀÌ ¾ø´Â °æ¿ì ¹®¼¸¦ ij½¬ÇÒ ÃÊ´ÜÀ§
206 ±âº» ½Ã°£À» ÁöÁ¤ÇÑ´Ù. <directive>CacheMaxExpire</directive>·Î
207 ÁöÁ¤ÇÑ °ªÀÌ ÀÌ ¼³Á¤À» ¹«½ÃÇÏÁö <em>¾Ê´Â´Ù</em>.</p>
210 CacheDefaultExpire 86400
216 <name>CacheIgnoreNoLastMod</name>
217 <description>ÀÀ´ä¿¡ Last Modified Çì´õ°¡ ¾ø´Ù´Â »ç½ÇÀ» ¹«½ÃÇÑ´Ù.</description>
218 <syntax>CacheIgnoreNoLastMod On|Off</syntax>
219 <default>CacheIgnoreNoLastMod Off</default>
220 <contextlist><context>server config</context><context>virtual host</context>
224 <p>º¸Åë ÃÖ±Ù¼öÁ¤ÀÏÀÌ ¾ø´Â ¹®¼´Â ij½¬ÇÏÁö ¾Ê´Â´Ù. ¾î¶² °æ¿ì
225 ÃÖ±Ù¼öÁ¤ÀÏÀ» (¿¹¸¦ µé¾î <module>mod_include</module> ó¸®Áß¿¡)
226 »©°Å³ª óÀ½ºÎÅÍ ¾ø¾úÀ» ¼ö°¡ ÀÖ´Ù.
227 <directive>CacheIgnoreNoLastMod</directive> Áö½Ã¾î´Â ÃÖ±Ù¼öÁ¤ÀÏÀÌ
228 ¾ø´Â ¹®¼µµ ¹Ýµå½Ã ij½¬Çϵµ·Ï ¸¸µç´Ù. ¹®¼¿¡ ÃÖ±Ù¼öÁ¤ÀÏ°ú
229 ¸¸±â½Ã°£ÀÌ ¾ø´Â °æ¿ì <directive>CacheDefaultExpire</directive>
230 Áö½Ã¾î·Î ÁöÁ¤ÇÑ °ªÀ» ¸¸±â½Ã°£À¸·Î »ç¿ëÇÑ´Ù.</p>
233 CacheIgnoreNoLastMod On
239 <name>CacheIgnoreCacheControl</name>
240 <description>Ŭ¶óÀ̾ðÆ®°¡ ij½¬ÇÏÁö¾Ê´Â ³»¿ëÀ» ¿äûÇÔÀ» ¹«½ÃÇÑ´Ù.</description>
241 <syntax>CacheIgnoreCacheControl On|Off</syntax>
242 <default>CacheIgnoreCacheControl Off</default>
243 <contextlist><context>server config</context><context>virtual host</context>
247 <p>º¸Åë no-cache³ª no-store Çì´õ°ªÀ» °¡Áø ¹®¼´Â ij½¬¿¡
248 ÀúÀåÇÏÁö¾Ê´Â´Ù. <directive>CacheIgnoreCacheControl</directive>
249 Áö½Ã¾î´Â ÀÌ·± ÇൿÀ» º¯°æÇÑ´Ù.
250 <directive>CacheIgnoreCacheControl</directive> OnÀ» »ç¿ëÇϸé
251 ¼¹ö´Â ¹®¼¿¡ no-cache³ª no-store Çì´õ°ªÀÌ À־ ¹®¼¸¦
252 ij½¬ÇÑ´Ù. ÀÎÁõÀÌ ÇÊ¿äÇÑ ¹®¼´Â <em>Àý´ë·Î</em> ij½¬ÇÏÁö
256 CacheIgnoreCacheControl On
262 <name>CacheLastModifiedFactor</name>
263 <description>LastModified ½Ã°£À¸·Î ¸¸±â½Ã°£À» °è»êÇϴµ¥ »ç¿ëÇÏ´Â
265 <syntax>CacheLastModifiedFactor <var>float</var></syntax>
266 <default>CacheLastModifiedFactor 0.1</default>
267 <contextlist><context>server config</context><context>virtual host</context>
271 <p>¹®¼¿¡ ¸¸±â½Ã°£Àº ¾øÁö¸¸ ÃÖ±Ù¼öÁ¤ÀÏÀÌ ÀÖ´Â °æ¿ì ÃÖ±Ù¼öÁ¤ÀÏ
272 ÀÌÈÄ Áö³ ½Ã°£À¸·Î ¸¸±â½Ã°£À» °è»êÇÑ´Ù.
273 <directive>CacheLastModifiedFactor</directive> Áö½Ã¾î´Â
274 ¸¸±â½Ã°£À» °è»êÇÏ´Â ´ÙÀ½ °ø½Ä¿¡¼ »ç¿ëÇÒ <var>factor</var>¸¦
277 <code>expiry-period = time-since-last-modified-date * <var>factor</var>
278 expiry-date = current-date + expiry-period</code>
280 ¿¹¸¦ µé¾î, ¹®¼°¡ 10 ½Ã°£ Àü¿¡ ¸¶Áö¸·À¸·Î ¼öÁ¤µÇ¾ú°í <var>factor</var>°¡
281 0.1À̶ó¸é ¸¸±â±â°£Àº 10*01 = 1 ½Ã°£ÀÌ µÈ´Ù. ÇöÀç ½Ã°£ÀÌ
282 3:00pmÀ̶ó¸é ¸¸±â½Ã°£Àº 3:00pm + 1½Ã°£ = 4:00pmÀÌ´Ù.
284 ¸¸±â±â°£ÀÌ <directive>CacheMaxExpire</directive> º¸´Ù ±æ´Ù¸é
285 <directive>CacheMaxExpire</directive>¸¦ »ç¿ëÇÑ´Ù.</p>
288 CacheLastModifiedFactor 0.5
294 <name>CacheForceCompletion</name>
295 <description>¿äûÀÌ Ãë¼ÒµÇ´õ¶óµµ ¼¹ö°¡ ÆÄÀÏÀ» °è¼Ó ij½¬ÇϱâÀ§ÇØ
296 ÇÊ¿äÇÑ ¹®¼ÀÇ ¼ºñ½º·ü.</description>
297 <syntax>CacheForceCompletion <var>Percentage</var></syntax>
298 <default>CacheForceCompletion 60</default>
299 <contextlist><context>server config</context><context>virtual host</context>
303 <p>º¸Åë ÀÀ´äÀ» ij½¬ÇÏ°í Ŭ¶óÀ̾ðÆ®·Î º¸³»´Â µµÁß¿¡ ¿äûÀÌ
304 Ãë¼ÒµÇ¸é ÀÀ´ä 󸮸¦ Áߴܵǰí ij½¬ Ç׸ñÀ» Áö¿î´Ù.
305 <directive>CacheForceCompletion</directive> Áö½Ã¾î´Â ¿äûÀÌ
306 Ãë¼ÒµÇ´õ¶óµµ ¹®¼¸¦ °è¼Ó ij½¬ÇÒ Á¤µµ¸¦ ÁöÁ¤ÇÑ´Ù.</p>
308 <p>Á¤µµ´Â ¹éºÐÀ²·Î ³ªÅ¸³»¸ç <code>1</code>°ú <code>100</code>
309 »çÀÌÀÇ °ªÀÌ´Ù. <code>0</code> °ªÀ» ÁöÁ¤ÇÏ¸é ±âº»°ªÀ» »ç¿ëÇÑ´Ù.
310 <code>100</code>Àº ³»¿ëÀ» ¸ðµÎ ¼ºñ½ºÇÑ ¹®¼¸¸À» ij½¬ÇÑ´Ù.
311 60°ú 90 »çÀÌÀÇ °ªÀ» ÃßõÇÑ´Ù.</p>
314 CacheForceCompletion 80
317 <note type="warning"><title>ÁÖÀÇ:</title>
318 ÀÌ ±â´ÉÀº ÇöÀç ±¸ÇöµÇÁö <em>¾Ê¾Ò´Ù</em>.