<-
Apache > HTTP Server > Documentation > Version 2.0 > ¸ðµâ

Please note

This document refers to the 2.0 version of Apache httpd, which is no longer maintained.
Upgrade, and refer to the current version of httpd instead, documented at:
You may follow this link to go to the current version of this document.

¾ÆÆÄÄ¡ ¸ðµâ mod_cache

°¡´ÉÇÑ ¾ð¾î:  en  |  ko 

ÀÌ ¹®¼­´Â ÃÖ½ÅÆÇ ¹ø¿ªÀÌ ¾Æ´Õ´Ï´Ù. ÃÖ±Ù¿¡ º¯°æµÈ ³»¿ëÀº ¿µ¾î ¹®¼­¸¦ Âü°íÇϼ¼¿ä.
¼³¸í:Content cache keyed to URIs.
»óÅÂ:Experimental
¸ðµâ¸í:cache_module
¼Ò½ºÆÄÀÏ:mod_cache.c

¿ä¾à

ÀÌ ¸ðµâÀº ½ÇÇèÀûÀÎ »óÅÂÀÌ´Ù. ¹®¼­´Â ¾ÆÁ÷ ÀÛ¾÷ÁßÀÌ´Ù...

mod_cache´Â °°Àº ÄÄÇ»ÅÍ¿¡ ÀÖ´Â ³»¿ëÀ̳ª ÇÁ·Ï½ÃµÈ ³»¿ëÀ» ij½¬ÇÒ ¼ö ÀÖ´Â RFC 2616 ȣȯ HTTP ³»¿ëij½¬¸¦ ±¸ÇöÇÑ´Ù. mod_cache¸¦ »ç¿ëÇÏ·Á¸é ÀúÀå°ü¸®¸ðµâ(storage management module)ÀÌ ÇÊ¿äÇÏ´Ù. ±âº» ¾ÆÆÄÄ¡ ¹èÆ÷º»¿¡´Â µÎ°¡Áö ÀúÀå°ü¸®¸ðµâÀÌ ÀÖ´Ù:

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

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

Áö½Ã¾îµé

ÁÖÁ¦

top

°ü·ÃµÈ ¸ðµâ°ú Áö½Ã¾î

top

¼³Á¤¿¹

Sample httpd.conf

#
# ¿¹Á¦ ij½¬ ¼³Á¤
#
LoadModule cache_module modules/mod_cache.so

<IfModule mod_cache.c>
#LoadModule disk_cache_module modules/mod_disk_cache.so
<IfModule mod_disk_cache.c>
CacheRoot c:/cacheroot
CacheSize 256
CacheEnable disk /
CacheDirLevels 5
CacheDirLength 3
</IfModule>

LoadModule mem_cache_module modules/mod_mem_cache.so
<IfModule mod_mem_cache.c>
CacheEnable mem /
MCacheSize 4096
MCacheMaxObjectCount 100
MCacheMinObjectSize 1
MCacheMaxObjectSize 2048
</IfModule>
</IfModule>

top

CacheDefaultExpire Áö½Ã¾î

¼³¸í:¸¸±â½Ã°£À» ÁöÁ¤ÇÏÁö¾ÊÀº ¹®¼­¸¦ ij½¬ÇÒ ±âº» ±â°£.
¹®¹ý:CacheDefaultExpire seconds
±âº»°ª:CacheDefaultExpire 3600 (one hour)
»ç¿ëÀå¼Ò:ÁÖ¼­¹ö¼³Á¤, °¡»óÈ£½ºÆ®
»óÅÂ:Experimental
¸ðµâ:mod_cache

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

CacheDefaultExpire 86400

top

CacheDisable Áö½Ã¾î

¼³¸í:ƯÁ¤ URLÀ» ij½¬ÇÏÁö ¾Ê´Â´Ù
¹®¹ý:CacheDisable url-string
»ç¿ëÀå¼Ò:ÁÖ¼­¹ö¼³Á¤, °¡»óÈ£½ºÆ®
»óÅÂ:Experimental
¸ðµâ:mod_cache

CacheDisable Áö½Ã¾î¸¦ »ç¿ëÇϸé mod_cache°¡ url-string ÀÌÇÏÀÇ urlµéÀ» ij½¬ÇÏÁö ¾Ê´Â´Ù.

¿¹Á¦

CacheDisable /local_files

top

CacheEnable Áö½Ã¾î

¼³¸í:ÁöÁ¤ÇÑ ÀúÀå°ü¸®ÀÚ¸¦ »ç¿ëÇÏ¿© ÁöÁ¤ÇÑ URLÀ» ij½¬ÇÑ´Ù
¹®¹ý:CacheEnable cache_type url-string
»ç¿ëÀå¼Ò:ÁÖ¼­¹ö¼³Á¤, °¡»óÈ£½ºÆ®
»óÅÂ:Experimental
¸ðµâ:mod_cache

CacheEnable Áö½Ã¾î¸¦ »ç¿ëÇϸé mod_cache°¡ url-string ÀÌÇÏ urlµéÀ» ij½¬ÇÑ´Ù. ij½¬ ÀúÀå°ü¸®ÀÚ´Â cache_type ¾Æ±Ô¸ÕÆ®·Î ÁöÁ¤ÇÑ´Ù. cache_type memÀº mod_mem_cache°¡ ±¸ÇöÇÏ´Â ¸Þ¸ð¸®±â¹Ý ÀúÀå°ü¸®ÀÚ¸¦ »ç¿ëÇÑ´Ù. cache_type disk´Â mod_disk_cache°¡ ±¸ÇöÇÏ´Â µð½ºÅ©±â¹Ý ÀúÀå°ü¸®ÀÚ¸¦ »ç¿ëÇÑ´Ù. cache_type fd´Â mod_mem_cache°¡ ±¸ÇöÇÏ´Â ÆÄÀϱâ¼úÀÚ Ä³½¬¸¦ »ç¿ëÇÑ´Ù.

(¾Æ·¡ ¿¹¿Í °°ÀÌ) URL °ø°£ÀÌ ´Ù¸¥ CacheEnable Áö½Ã¾î¿Í °ãÄ¡¸é ½ÇÁ¦·Î ÇÑ ÀúÀå°ü¸®ÀÚ°¡ ¿äûÀ» ó¸®ÇÒ¶§±îÁö µÎ ÀúÀå°ü¸®ÀÚ¸¦ ¸ðµÎ ½ÇÇàÇÑ´Ù. ¼³Á¤ÆÄÀÏ¿¡¼­ CacheEnable Áö½Ã¾îÀÇ ¼ø¼­´ë·Î ÀúÀå°ü¸®ÀÚ°¡ ½ÇÇàµÈ´Ù.

CacheEnable mem /manual
CacheEnable fd /images
CacheEnable disk /

top

CacheForceCompletion Áö½Ã¾î

¼³¸í:¿äûÀÌ Ãë¼ÒµÇ´õ¶óµµ ¼­¹ö°¡ ÆÄÀÏÀ» °è¼Ó ij½¬ÇϱâÀ§ÇØ ÇÊ¿äÇÑ ¹®¼­ÀÇ ¼­ºñ½º·ü.
¹®¹ý:CacheForceCompletion Percentage
±âº»°ª:CacheForceCompletion 60
»ç¿ëÀå¼Ò:ÁÖ¼­¹ö¼³Á¤, °¡»óÈ£½ºÆ®
»óÅÂ:Experimental
¸ðµâ:mod_cache

º¸Åë ÀÀ´äÀ» ij½¬ÇÏ°í Ŭ¶óÀ̾ðÆ®·Î º¸³»´Â µµÁß¿¡ ¿äûÀÌ Ãë¼ÒµÇ¸é ÀÀ´ä 󸮸¦ Áߴܵǰí ij½¬ Ç׸ñÀ» Áö¿î´Ù. CacheForceCompletion Áö½Ã¾î´Â ¿äûÀÌ Ãë¼ÒµÇ´õ¶óµµ ¹®¼­¸¦ °è¼Ó ij½¬ÇÒ Á¤µµ¸¦ ÁöÁ¤ÇÑ´Ù.

Á¤µµ´Â ¹éºÐÀ²·Î ³ªÅ¸³»¸ç 1°ú 100 »çÀÌÀÇ °ªÀÌ´Ù. 0 °ªÀ» ÁöÁ¤ÇÏ¸é ±âº»°ªÀ» »ç¿ëÇÑ´Ù. 100Àº ³»¿ëÀ» ¸ðµÎ ¼­ºñ½ºÇÑ ¹®¼­¸¸À» ij½¬ÇÑ´Ù. 60°ú 90 »çÀÌÀÇ °ªÀ» ÃßõÇÑ´Ù.

CacheForceCompletion 80

ÁÖÀÇ:

ÀÌ ±â´ÉÀº ÇöÀç ±¸ÇöµÇÁö ¾Ê¾Ò´Ù.
top

CacheIgnoreCacheControl Áö½Ã¾î

¼³¸í:Ŭ¶óÀ̾ðÆ®°¡ ij½¬ÇÏÁö¾Ê´Â ³»¿ëÀ» ¿äûÇÔÀ» ¹«½ÃÇÑ´Ù.
¹®¹ý:CacheIgnoreCacheControl On|Off
±âº»°ª:CacheIgnoreCacheControl Off
»ç¿ëÀå¼Ò:ÁÖ¼­¹ö¼³Á¤, °¡»óÈ£½ºÆ®
»óÅÂ:Experimental
¸ðµâ:mod_cache

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

CacheIgnoreCacheControl On

top

CacheIgnoreHeaders Áö½Ã¾î

¼³¸í:Do not store the given HTTP header(s) in the cache.
¹®¹ý:CacheIgnoreHeaders header-string [header-string] ...
±âº»°ª:CacheIgnoreHeaders None
»ç¿ëÀå¼Ò:ÁÖ¼­¹ö¼³Á¤, °¡»óÈ£½ºÆ®
»óÅÂ:Experimental
¸ðµâ:mod_cache

The documentation for this directive has not been translated yet. Please have a look at the English version.

top

CacheIgnoreNoLastMod Áö½Ã¾î

¼³¸í:ÀÀ´ä¿¡ Last Modified Çì´õ°¡ ¾ø´Ù´Â »ç½ÇÀ» ¹«½ÃÇÑ´Ù.
¹®¹ý:CacheIgnoreNoLastMod On|Off
±âº»°ª:CacheIgnoreNoLastMod Off
»ç¿ëÀå¼Ò:ÁÖ¼­¹ö¼³Á¤, °¡»óÈ£½ºÆ®
»óÅÂ:Experimental
¸ðµâ:mod_cache

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

CacheIgnoreNoLastMod On

top

CacheLastModifiedFactor Áö½Ã¾î

¼³¸í:LastModified ½Ã°£À¸·Î ¸¸±â½Ã°£À» °è»êÇϴµ¥ »ç¿ëÇÏ´Â °è¼ö.
¹®¹ý:CacheLastModifiedFactor float
±âº»°ª:CacheLastModifiedFactor 0.1
»ç¿ëÀå¼Ò:ÁÖ¼­¹ö¼³Á¤, °¡»óÈ£½ºÆ®
»óÅÂ:Experimental
¸ðµâ:mod_cache

¹®¼­¿¡ ¸¸±â½Ã°£Àº ¾øÁö¸¸ ÃÖ±Ù¼öÁ¤ÀÏÀÌ ÀÖ´Â °æ¿ì ÃÖ±Ù¼öÁ¤ÀÏ ÀÌÈÄ Áö³­ ½Ã°£À¸·Î ¸¸±â½Ã°£À» °è»êÇÑ´Ù. CacheLastModifiedFactor Áö½Ã¾î´Â ¸¸±â½Ã°£À» °è»êÇÏ´Â ´ÙÀ½ °ø½Ä¿¡¼­ »ç¿ëÇÒ factor¸¦ ÁöÁ¤ÇÑ´Ù: expiry-period = time-since-last-modified-date * factor expiry-date = current-date + expiry-period ¿¹¸¦ µé¾î, ¹®¼­°¡ 10 ½Ã°£ Àü¿¡ ¸¶Áö¸·À¸·Î ¼öÁ¤µÇ¾ú°í factor°¡ 0.1À̶ó¸é ¸¸±â±â°£Àº 10*01 = 1 ½Ã°£ÀÌ µÈ´Ù. ÇöÀç ½Ã°£ÀÌ 3:00pmÀ̶ó¸é ¸¸±â½Ã°£Àº 3:00pm + 1½Ã°£ = 4:00pmÀÌ´Ù. ¸¸±â±â°£ÀÌ CacheMaxExpire º¸´Ù ±æ´Ù¸é CacheMaxExpire¸¦ »ç¿ëÇÑ´Ù.

CacheLastModifiedFactor 0.5

top

CacheMaxExpire Áö½Ã¾î

¼³¸í:¹®¼­¸¦ ij½¬ÇÏ´Â ÃÊ´ÜÀ§ ÃÖ´ë½Ã°£
¹®¹ý:CacheMaxExpire seconds
±âº»°ª:CacheMaxExpire 86400 (ÇÏ·ç)
»ç¿ëÀå¼Ò:ÁÖ¼­¹ö¼³Á¤, °¡»óÈ£½ºÆ®
»óÅÂ:Experimental
¸ðµâ:mod_cache

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

CacheMaxExpire 604800

°¡´ÉÇÑ ¾ð¾î:  en  |  ko