| <?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: 1.17 --> |
| |
| <!-- |
| Copyright 2003-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_cache.xml.meta"> |
| |
| <name>mod_cache</name> |
| <description>Content cache keyed to URIs.</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 /> |
| <IfModule mod_cache.c><br /> |
| <indent> |
| #LoadModule disk_cache_module modules/mod_disk_cache.so<br /> |
| <IfModule mod_disk_cache.c><br /> |
| <indent> |
| CacheRoot c:/cacheroot<br /> |
| CacheSize 256<br /> |
| CacheEnable disk /<br /> |
| CacheDirLevels 5<br /> |
| CacheDirLength 3<br /> |
| </indent> |
| </IfModule> <br /> |
| <br /> |
| LoadModule mem_cache_module modules/mod_mem_cache.so<br /> |
| <IfModule mod_mem_cache.c><br /> |
| <indent> |
| CacheEnable mem /<br /> |
| MCacheSize 4096<br /> |
| MCacheMaxObjectCount 100<br /> |
| MCacheMinObjectSize 1<br /> |
| MCacheMaxObjectSize 2048<br /> |
| </indent> |
| </IfModule><br /> |
| </indent> |
| </IfModule> |
| </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>CacheForceCompletion</name> |
| <description>¿äûÀÌ Ãë¼ÒµÇ´õ¶óµµ ¼¹ö°¡ ÆÄÀÏÀ» °è¼Ó ij½¬ÇϱâÀ§ÇØ |
| ÇÊ¿äÇÑ ¹®¼ÀÇ ¼ºñ½º·ü.</description> |
| <syntax>CacheForceCompletion <var>Percentage</var></syntax> |
| <default>CacheForceCompletion 60</default> |
| <contextlist><context>server config</context><context>virtual host</context> |
| </contextlist> |
| |
| <usage> |
| <p>º¸Åë ÀÀ´äÀ» ij½¬ÇÏ°í Ŭ¶óÀ̾ðÆ®·Î º¸³»´Â µµÁß¿¡ ¿äûÀÌ |
| Ãë¼ÒµÇ¸é ÀÀ´ä 󸮸¦ Áߴܵǰí ij½¬ Ç׸ñÀ» Áö¿î´Ù. |
| <directive>CacheForceCompletion</directive> Áö½Ã¾î´Â ¿äûÀÌ |
| Ãë¼ÒµÇ´õ¶óµµ ¹®¼¸¦ °è¼Ó ij½¬ÇÒ Á¤µµ¸¦ ÁöÁ¤ÇÑ´Ù.</p> |
| |
| <p>Á¤µµ´Â ¹éºÐÀ²·Î ³ªÅ¸³»¸ç <code>1</code>°ú <code>100</code> |
| »çÀÌÀÇ °ªÀÌ´Ù. <code>0</code> °ªÀ» ÁöÁ¤ÇÏ¸é ±âº»°ªÀ» »ç¿ëÇÑ´Ù. |
| <code>100</code>Àº ³»¿ëÀ» ¸ðµÎ ¼ºñ½ºÇÑ ¹®¼¸¸À» ij½¬ÇÑ´Ù. |
| 60°ú 90 »çÀÌÀÇ °ªÀ» ÃßõÇÑ´Ù.</p> |
| |
| <example> |
| CacheForceCompletion 80 |
| </example> |
| |
| <note type="warning"><title>ÁÖÀÇ:</title> |
| ÀÌ ±â´ÉÀº ÇöÀç ±¸ÇöµÇÁö <em>¾Ê¾Ò´Ù</em>. |
| </note> |
| </usage> |
| </directivesynopsis> |
| |
| </modulesynopsis> |