summaryrefslogtreecommitdiff
path: root/docs/manual/mod/mod_cache.xml.ko
blob: 71e990ec17a7dd0f4717d81cecfaa4e83d180863 (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
<?xml version="1.0" encoding="EUC-KR" ?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
<!-- English Revision: 105569:373585 (outdated) -->

<!--
 Copyright 2003-2005 The Apache Software Foundation or its licensors,
                     as applicable.

 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_cache.xml.meta">

<name>mod_cache</name>
<description>URI¸¦ Å°·Î »ç¿ëÇÏ¿© ³»¿ëÀ» ij½¬ÇÑ´Ù.</description>
<status>Experimental</status>
<sourcefile>mod_cache.c</sourcefile>
<identifier>cache_module</identifier>

<summary>
    <note type="warning">
      ÀÌ ¸ðµâÀº ½ÇÇèÀûÀÎ »óÅÂÀÌ´Ù. ¹®¼­´Â ¾ÆÁ÷ ÀÛ¾÷ÁßÀÌ´Ù...
    </note>

    <p><module>mod_cache</module>´Â °°Àº ÄÄÇ»ÅÍ¿¡ ÀÖ´Â ³»¿ëÀ̳ª
    ÇÁ·Ï½ÃµÈ ³»¿ëÀ» ij½¬ÇÒ ¼ö ÀÖ´Â <a
    href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>
    ȣȯ HTTP ³»¿ëij½¬¸¦ ±¸ÇöÇÑ´Ù. <module>mod_cache</module>¸¦
    »ç¿ëÇÏ·Á¸é ÀúÀå°ü¸®¸ðµâ(storage management module)ÀÌ ÇÊ¿äÇÏ´Ù.
    ±âº» ¾ÆÆÄÄ¡ ¹èÆ÷º»¿¡´Â µÎ°¡Áö ÀúÀå°ü¸®¸ðµâÀÌ ÀÖ´Ù:</p>
    <dl>
    <dt><module>mod_disk_cache</module></dt>
    <dd>´Â µð½ºÅ©±â¹Ý ÀúÀå°ü¸®ÀÚ¸¦ ±¸ÇöÇÑ´Ù.</dd>

    <dt><module>mod_mem_cache</module></dt>
    <dd>´Â ¸Þ¸ð¸®±â¹Ý ÀúÀå°ü¸®ÀÚ¸¦ ±¸ÇöÇÑ´Ù.
    <module>mod_mem_cache</module>´Â ÆÄÀϱâ¼úÀÚ¸¦ ij½¬Çϰųª
    Èü(heap) °ø°£¿¡ °´Ã¼¸¦ ij½¬ÇÏ´Â µÎ°¡Áö ¹æ½ÄÁß ÇÑ°¡Áö ¹æ¹ýÀ¸·Î
    µ¿ÀÛÇϵµ·Ï ¼³Á¤ÇÒ ¼ö ÀÖ´Ù. <module>mod_mem_cache</module>´Â
    ÀÚ½ÅÀÌ »ý¼ºÇÑ ³»¿ëÀ» ij½¬Çϰųª, (<dfn>¿ªÇÁ·Ï½Ã(reverse proxy)</dfn>·Î
    ¾Ë·ÁÁø) <directive module="mod_proxy">ProxyPass</directive>¸¦
    »ç¿ëÇÏ¿© <module>mod_proxy</module>¸¦ À§ÇØ µÞ´Ü ¼­¹ö³»¿ëÀ»
    ij½¬ÇÒ ¼ö ÀÖ´Ù.</dd>
    </dl>

    <p>³»¿ëÀ» URI¸¦ Åä´ë·Î ¸¸µç Å°·Î ij½¬¿¡ ÀúÀåÇÏ°í °¡Á®¿Â´Ù.
    Á¢±Ùº¸È£°¡ µÈ ³»¿ëÀº ij½¬ÇÏÁö¾Ê´Â´Ù.</p>
</summary>

<section id="related"><title>°ü·ÃµÈ ¸ðµâ°ú Áö½Ã¾î</title>
    <related>
      <modulelist>
        <module>mod_disk_cache</module>
        <module>mod_mem_cache</module>
      </modulelist>
      <directivelist>
        <directive module="mod_disk_cache">CacheRoot</directive>
        <directive module="mod_disk_cache">CacheSize</directive>
        <directive module="mod_disk_cache">CacheGcInterval</directive>
        <directive module="mod_disk_cache">CacheDirLevels</directive>
        <directive module="mod_disk_cache">CacheDirLength</directive>
        <directive module="mod_disk_cache">CacheExpiryCheck</directive>
        <directive module="mod_disk_cache">CacheMinFileSize</directive>
        <directive module="mod_disk_cache">CacheMaxFileSize</directive>
        <directive module="mod_disk_cache">CacheTimeMargin</directive>
        <directive module="mod_disk_cache">CacheGcDaily</directive>
        <directive module="mod_disk_cache">CacheGcUnused</directive>
        <directive module="mod_disk_cache">CacheGcClean</directive>
        <directive module="mod_disk_cache">CacheGcMemUsage</directive>
        <directive module="mod_mem_cache">MCacheSize</directive>
        <directive module="mod_mem_cache">MCacheMaxObjectCount</directive>
        <directive module="mod_mem_cache">MCacheMinObjectSize</directive>
        <directive module="mod_mem_cache">MCacheMaxObjectSize</directive>
        <directive module="mod_mem_cache">MCacheRemovalAlgorithm</directive>
        <directive module="mod_mem_cache">MCacheMaxStreamingBuffer</directive>
      </directivelist>
    </related>
</section>

<section id="sampleconf"><title>¼³Á¤¿¹</title>
    <example><title>Sample httpd.conf</title>
      #<br />
      # ¿¹Á¦ ij½¬ ¼³Á¤<br />
      #<br />
      LoadModule cache_module modules/mod_cache.so<br />
      <br />
      &lt;IfModule mod_cache.c&gt;<br />
      <indent>
        #LoadModule disk_cache_module modules/mod_disk_cache.so<br />
        &lt;IfModule mod_disk_cache.c&gt;<br />
        <indent>
          CacheRoot c:/cacheroot<br />
          CacheSize 256<br />
          CacheEnable disk  /<br />
          CacheDirLevels 5<br />
          CacheDirLength 3<br />
        </indent>
        &lt;/IfModule&gt; <br />
        <br />
        LoadModule mem_cache_module modules/mod_mem_cache.so<br />
        &lt;IfModule mod_mem_cache.c&gt;<br />
        <indent>
          CacheEnable mem  /<br />
          MCacheSize 4096<br />
          MCacheMaxObjectCount 100<br />
          MCacheMinObjectSize 1<br />
          MCacheMaxObjectSize 2048<br />
        </indent>
        &lt;/IfModule&gt;<br />
      </indent>
      &lt;/IfModule&gt;
    </example>
</section>

<directivesynopsis>
<name>CacheEnable</name>
<description>ÁöÁ¤ÇÑ ÀúÀå°ü¸®ÀÚ¸¦ »ç¿ëÇÏ¿© ÁöÁ¤ÇÑ URLÀ» ij½¬ÇÑ´Ù</description>
<syntax>CacheEnable <var>cache_type</var> <var>url-string</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p><directive>CacheEnable</directive> Áö½Ã¾î¸¦ »ç¿ëÇϸé
    <module>mod_cache</module>°¡ <var>url-string</var> ÀÌÇÏ
    urlµéÀ» ij½¬ÇÑ´Ù. ij½¬ ÀúÀå°ü¸®ÀÚ´Â <var>cache_type</var>
    ¾Æ±Ô¸ÕÆ®·Î ÁöÁ¤ÇÑ´Ù. <var>cache_type</var> <code>mem</code>Àº
    <module>mod_mem_cache</module>°¡ ±¸ÇöÇÏ´Â ¸Þ¸ð¸®±â¹Ý
    ÀúÀå°ü¸®ÀÚ¸¦ »ç¿ëÇÑ´Ù. <var>cache_type</var> <code>disk</code>´Â
    <module>mod_disk_cache</module>°¡ ±¸ÇöÇÏ´Â µð½ºÅ©±â¹Ý
    ÀúÀå°ü¸®ÀÚ¸¦ »ç¿ëÇÑ´Ù. <var>cache_type</var> <code>fd</code>´Â
    <module>mod_mem_cache</module>°¡ ±¸ÇöÇÏ´Â ÆÄÀϱâ¼úÀÚ Ä³½¬¸¦
    »ç¿ëÇÑ´Ù.</p>
    <p>(¾Æ·¡ ¿¹¿Í °°ÀÌ) URL °ø°£ÀÌ ´Ù¸¥
    <directive>CacheEnable</directive> Áö½Ã¾î¿Í °ãÄ¡¸é ½ÇÁ¦·Î
    ÇÑ ÀúÀå°ü¸®ÀÚ°¡ ¿äûÀ» ó¸®ÇÒ¶§±îÁö µÎ ÀúÀå°ü¸®ÀÚ¸¦ ¸ðµÎ
    ½ÇÇàÇÑ´Ù. ¼³Á¤ÆÄÀÏ¿¡¼­ <directive>CacheEnable</directive>
    Áö½Ã¾îÀÇ ¼ø¼­´ë·Î ÀúÀå°ü¸®ÀÚ°¡ ½ÇÇàµÈ´Ù.</p>

    <example>
      CacheEnable  mem   /manual<br />
      CacheEnable  fd    /images<br />
      CacheEnable  disk  /<br />
    </example>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheDisable</name>
<description>ƯÁ¤ URLÀ» ij½¬ÇÏÁö ¾Ê´Â´Ù</description>
<syntax>CacheDisable <var> url-string</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p><directive>CacheDisable</directive> Áö½Ã¾î¸¦ »ç¿ëÇϸé
    <module>mod_cache</module>°¡ <var>url-string</var> ÀÌÇÏÀÇ
    urlµéÀ» ij½¬ÇÏÁö <em>¾Ê´Â´Ù</em>.</p>

    <example><title>¿¹Á¦</title>
      CacheDisable /local_files
    </example>
</usage>

</directivesynopsis>
<directivesynopsis>
<name>CacheMaxExpire</name>
<description>¹®¼­¸¦ ij½¬ÇÏ´Â ÃÊ´ÜÀ§ ÃÖ´ë½Ã°£</description>
<syntax>CacheMaxExpire <var>seconds</var></syntax>
<default>CacheMaxExpire 86400 (ÇÏ·ç)</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p><directive>CacheMaxExpire</directive> Áö½Ã¾î´Â ½ÇÁ¦ ¼­¹ö¸¦
    °Ë»çÇÏÁö¾Ê°í ij½¬°¡´ÉÇÑ HTTP ¹®¼­¸¦ À¯ÁöÇÒ ¼ö ÀÖ´Â ÃÊ´ÜÀ§
    ÃÖ´ë½Ã°£À» ÁöÁ¤ÇÑ´Ù. Áï, ¹®¼­´Â ÃÖ´ëÇÑ ÀÌ ¼³Á¤°ª¸¸Å­ ¿À·¡µÇ¾ú´Ù.
    ¹®¼­°¡ ¸¸±â½Ã°£À» ÁöÁ¤ÇÏ¿©µµ ÀÌ ÃÖ´ë°ªÀ» ÁöŲ´Ù.</p>

    <example>
      CacheMaxExpire 604800
    </example>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheDefaultExpire</name>
<description>¸¸±â½Ã°£À» ÁöÁ¤ÇÏÁö¾ÊÀº ¹®¼­¸¦ ij½¬ÇÒ ±âº» ±â°£.</description>
<syntax>CacheDefaultExpire <var>seconds</var></syntax>
<default>CacheDefaultExpire 3600 (one hour)</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p><directive>CacheDefaultExpire</directive> Áö½Ã¾î´Â ¹®¼­ÀÇ
    ¸¸±â½Ã°£°ú ÃÖ±Ù¼öÁ¤½Ã°£ÀÌ ¾ø´Â °æ¿ì ¹®¼­¸¦ ij½¬ÇÒ ÃÊ´ÜÀ§
    ±âº» ½Ã°£À» ÁöÁ¤ÇÑ´Ù. <directive>CacheMaxExpire</directive>·Î
    ÁöÁ¤ÇÑ °ªÀÌ ÀÌ ¼³Á¤À» ¹«½ÃÇÏÁö <em>¾Ê´Â´Ù</em>.</p>

    <example>
      CacheDefaultExpire 86400
    </example>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheIgnoreNoLastMod</name>
<description>ÀÀ´ä¿¡ Last Modified Çì´õ°¡ ¾ø´Ù´Â »ç½ÇÀ» ¹«½ÃÇÑ´Ù.</description>
<syntax>CacheIgnoreNoLastMod On|Off</syntax>
<default>CacheIgnoreNoLastMod Off</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p>º¸Åë ÃÖ±Ù¼öÁ¤ÀÏÀÌ ¾ø´Â ¹®¼­´Â ij½¬ÇÏÁö ¾Ê´Â´Ù. ¾î¶² °æ¿ì
    ÃÖ±Ù¼öÁ¤ÀÏÀ» (¿¹¸¦ µé¾î <module>mod_include</module> ó¸®Áß¿¡)
    »©°Å³ª óÀ½ºÎÅÍ ¾ø¾úÀ» ¼ö°¡ ÀÖ´Ù.
    <directive>CacheIgnoreNoLastMod</directive> Áö½Ã¾î´Â ÃÖ±Ù¼öÁ¤ÀÏÀÌ
    ¾ø´Â ¹®¼­µµ ¹Ýµå½Ã ij½¬Çϵµ·Ï ¸¸µç´Ù. ¹®¼­¿¡ ÃÖ±Ù¼öÁ¤ÀÏ°ú
    ¸¸±â½Ã°£ÀÌ ¾ø´Â °æ¿ì <directive>CacheDefaultExpire</directive>
    Áö½Ã¾î·Î ÁöÁ¤ÇÑ °ªÀ» ¸¸±â½Ã°£À¸·Î »ç¿ëÇÑ´Ù.</p>

    <example>
      CacheIgnoreNoLastMod On
    </example>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheIgnoreCacheControl</name>
<description>Ŭ¶óÀ̾ðÆ®°¡ ij½¬ÇÏÁö¾Ê´Â ³»¿ëÀ» ¿äûÇÔÀ» ¹«½ÃÇÑ´Ù.</description>
<syntax>CacheIgnoreCacheControl On|Off</syntax>
<default>CacheIgnoreCacheControl Off</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p>º¸Åë no-cache³ª no-store Çì´õ°ªÀ» °¡Áø ¹®¼­´Â ij½¬¿¡
    ÀúÀåÇÏÁö¾Ê´Â´Ù. <directive>CacheIgnoreCacheControl</directive>
    Áö½Ã¾î´Â ÀÌ·± ÇൿÀ» º¯°æÇÑ´Ù.
    <directive>CacheIgnoreCacheControl</directive> OnÀ» »ç¿ëÇϸé
    ¼­¹ö´Â ¹®¼­¿¡ no-cache³ª no-store Çì´õ°ªÀÌ À־ ¹®¼­¸¦
    ij½¬ÇÑ´Ù. ÀÎÁõÀÌ ÇÊ¿äÇÑ ¹®¼­´Â <em>Àý´ë·Î</em> ij½¬ÇÏÁö
    ¾Ê´Â´Ù.</p>

    <example>
      CacheIgnoreCacheControl On
    </example>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheLastModifiedFactor</name>
<description>LastModified ½Ã°£À¸·Î ¸¸±â½Ã°£À» °è»êÇϴµ¥ »ç¿ëÇÏ´Â
°è¼ö.</description>
<syntax>CacheLastModifiedFactor <var>float</var></syntax>
<default>CacheLastModifiedFactor 0.1</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p>¹®¼­¿¡ ¸¸±â½Ã°£Àº ¾øÁö¸¸ ÃÖ±Ù¼öÁ¤ÀÏÀÌ ÀÖ´Â °æ¿ì ÃÖ±Ù¼öÁ¤ÀÏ
    ÀÌÈÄ Áö³­ ½Ã°£À¸·Î ¸¸±â½Ã°£À» °è»êÇÑ´Ù.
    <directive>CacheLastModifiedFactor</directive> Áö½Ã¾î´Â
    ¸¸±â½Ã°£À» °è»êÇÏ´Â ´ÙÀ½ °ø½Ä¿¡¼­ »ç¿ëÇÒ <var>factor</var>¸¦
    ÁöÁ¤ÇÑ´Ù:

    <code>expiry-period = time-since-last-modified-date * <var>factor</var>
    expiry-date = current-date + expiry-period</code>

    ¿¹¸¦ µé¾î, ¹®¼­°¡ 10 ½Ã°£ Àü¿¡ ¸¶Áö¸·À¸·Î ¼öÁ¤µÇ¾ú°í <var>factor</var>°¡
    0.1À̶ó¸é ¸¸±â±â°£Àº 10*01 = 1 ½Ã°£ÀÌ µÈ´Ù. ÇöÀç ½Ã°£ÀÌ
    3:00pmÀ̶ó¸é ¸¸±â½Ã°£Àº 3:00pm + 1½Ã°£ = 4:00pmÀÌ´Ù.

    ¸¸±â±â°£ÀÌ <directive>CacheMaxExpire</directive> º¸´Ù ±æ´Ù¸é
    <directive>CacheMaxExpire</directive>¸¦ »ç¿ëÇÑ´Ù.</p>

    <example>
      CacheLastModifiedFactor 0.5
    </example>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheIgnoreHeaders</name>
<description>ij½¬¿¡ ÁöÁ¤ÇÑ HTTP Çì´õ(µé)¸¦ ÀúÀåÇÏÁö ¾Ê´Â´Ù
</description>
<syntax>CacheIgnoreHeaders <var>header-string</var> [<var>header-string</var>] ...</syntax>
<default>CacheIgnoreHeaders None</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p>RFC 2616¿¡ µû¸£¸é È©°£(hop-by-hop) HTTP Çì´õ´Â ij½¬¿¡
    ÀúÀåÇÏÁö ¾Ê´Â´Ù. È©°£ HTTP Çì´õ¿¡´Â ´ÙÀ½°ú °°Àº °ÍÀÌ ÀÖÀ¸¸ç,
    <directive>CacheIgnoreHeaders</directive> ¼³Á¤°ú °ü°è¾øÀÌ
    <em>¾î¶²</em> °æ¿ì¿¡µµ ij½¬¿¡ ÀúÀåµÇÁö ¾Ê´Â´Ù.</p>

    <ul>
      <li><code>Connection</code></li>
      <li><code>Keep-Alive</code></li>
      <li><code>Proxy-Authenticate</code></li>
      <li><code>Proxy-Authorization</code></li>
      <li><code>TE</code></li>
      <li><code>Trailers</code></li>
      <li><code>Transfer-Encoding</code></li>
      <li><code>Upgrade</code></li>
    </ul>

    <p><directive>CacheIgnoreHeaders</directive>´Â ij½¬¿¡ ÀúÀåÇϸé
    ¾ÈµÇ´Â HTTP Çì´õ¸¦ Ãß°¡·Î ÁöÁ¤ÇÑ´Ù. ¿¹¸¦ µé¾î, ÄíÅ°(cookie)¸¦
    ij½¬¿¡ ÀúÀåÇÏ¸é ¾ÈµÇ´Â °æ¿ì°¡ ÀÖ´Ù.</p>

    <p><directive>CacheIgnoreHeaders</directive>´Â ij½¬¿¡ ÀúÀåÇÏÁö
    ¾ÊÀ» HTTP Çì´õµéÀ» °ø¹éÀ¸·Î ±¸ºÐÇÑ ¸ñ·ÏÀ» ¹Þ´Â´Ù. (RFC 2616¿¡
    µû¶ó) ij½¬¿¡ È©°£ Çì´õ¸¸ ÀúÀåÇÏÁö ¾ÊÀ¸·Á¸é,
    <directive>CacheIgnoreHeaders</directive>¸¦
    <code>None</code>À¸·Î ¼³Á¤ÇÑ´Ù.</p>

    <example><title>¿¹Á¦ 1</title>
      CacheIgnoreHeaders Set-Cookie
    </example>

    <example><title>¿¹Á¦ 2</title>
      CacheIgnoreHeaders None
    </example>

    <note type="warning"><title>°æ°í:</title>
      <directive>CacheIgnoreHeaders</directive> ¼³Á¤À» »ç¿ëÇÏ¿©
      <code>Expires</code> °°ÀÌ Ä³½¬ °ü¸®¿¡ ÇÊ¿äÇÑ Çì´õ¸¦ ÀúÀåÇÏÁö
      ¾ÊÀ¸¸é, mod_cache´Â ºñÁ¤»óÀûÀ¸·Î µ¿ÀÛÇÑ´Ù.
    </note>
</usage>
</directivesynopsis>

</modulesynopsis>