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

Please note

This document refers to the 2.2 version of Apache httpd, which is no longer maintained. The active release is documented here. If you have not already upgraded, please follow this link for more information.

You may follow this link to go to the current version of this document.

¾ÆÆÄÄ¡ ¸ðµâ mod_cache

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

ÀÌ ¹®¼­´Â ÃÖ½ÅÆÇ ¹ø¿ªÀÌ ¾Æ´Õ´Ï´Ù. ÃÖ±Ù¿¡ º¯°æµÈ ³»¿ëÀº ¿µ¾î ¹®¼­¸¦ Âü°íÇϼ¼¿ä.
¼³¸í:URI¸¦ Å°·Î »ç¿ëÇÏ¿© ³»¿ëÀ» ij½¬ÇÑ´Ù.
»óÅÂ: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

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 Áö½Ã¾î

¼³¸í:ij½¬¿¡ ÁöÁ¤ÇÑ HTTP Çì´õ(µé)¸¦ ÀúÀåÇÏÁö ¾Ê´Â´Ù
¹®¹ý:CacheIgnoreHeaders header-string [header-string] ...
±âº»°ª:CacheIgnoreHeaders None
»ç¿ëÀå¼Ò:ÁÖ¼­¹ö¼³Á¤, °¡»óÈ£½ºÆ®
»óÅÂ:Experimental
¸ðµâ:mod_cache

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

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

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

¿¹Á¦ 1

CacheIgnoreHeaders Set-Cookie

¿¹Á¦ 2

CacheIgnoreHeaders None

°æ°í:

CacheIgnoreHeaders ¼³Á¤À» »ç¿ëÇÏ¿© Expires °°ÀÌ Ä³½¬ °ü¸®¿¡ ÇÊ¿äÇÑ Çì´õ¸¦ ÀúÀåÇÏÁö ¾ÊÀ¸¸é, mod_cache´Â ºñÁ¤»óÀûÀ¸·Î µ¿ÀÛÇÑ´Ù.
top

CacheIgnoreNoLastMod Áö½Ã¾î

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

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

CacheIgnoreNoLastMod On

top

CacheIgnoreQueryString Áö½Ã¾î

¼³¸í:Ignore query string when caching
¹®¹ý:CacheIgnoreQueryString On|Off
±âº»°ª:CacheIgnoreQueryString Off
»ç¿ëÀå¼Ò:ÁÖ¼­¹ö¼³Á¤, °¡»óÈ£½ºÆ®
»óÅÂ:Extension
¸ðµâ:mod_cache
Áö¿ø:Available in Apache 2.2.6 and later

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

top

CacheIgnoreURLSessionIdentifiers Áö½Ã¾î

¼³¸í:Ignore defined session identifiers encoded in the URL when caching
¹®¹ý:CacheIgnoreURLSessionIdentifiers identifier [identifier] ...
±âº»°ª:CacheIgnoreURLSessionIdentifiers None
»ç¿ëÀå¼Ò:ÁÖ¼­¹ö¼³Á¤, °¡»óÈ£½ºÆ®
»óÅÂ:Extension
¸ðµâ:mod_cache

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

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

CacheLock Áö½Ã¾î

¼³¸í:Enable the thundering herd lock.
¹®¹ý:CacheLock on|off
±âº»°ª:CacheLock off
»ç¿ëÀå¼Ò:ÁÖ¼­¹ö¼³Á¤, °¡»óÈ£½ºÆ®
»óÅÂ:Extension
¸ðµâ:mod_cache
Áö¿ø:Available in Apache 2.2.15 and later

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

top

CacheLockMaxAge Áö½Ã¾î

¼³¸í:Set the maximum possible age of a cache lock.
¹®¹ý:CacheLockMaxAge integer
±âº»°ª:CacheLockMaxAge 5
»ç¿ëÀå¼Ò:ÁÖ¼­¹ö¼³Á¤, °¡»óÈ£½ºÆ®
»óÅÂ:Extension
¸ðµâ:mod_cache

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

top

CacheLockPath Áö½Ã¾î

¼³¸í:Set the lock path directory.
¹®¹ý:CacheLockPath directory
±âº»°ª:CacheLockPath /tmp/mod_cache-lock
»ç¿ëÀå¼Ò:ÁÖ¼­¹ö¼³Á¤, °¡»óÈ£½ºÆ®
»óÅÂ:Extension
¸ðµâ:mod_cache

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

top

CacheMaxExpire Áö½Ã¾î

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

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

CacheMaxExpire 604800

top

CacheStoreNoStore Áö½Ã¾î

¼³¸í:Attempt to cache requests or responses that have been marked as no-store.
¹®¹ý:CacheStoreNoStore On|Off
±âº»°ª:CacheStoreNoStore Off
»ç¿ëÀå¼Ò:ÁÖ¼­¹ö¼³Á¤, °¡»óÈ£½ºÆ®
»óÅÂ:Extension
¸ðµâ:mod_cache

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

Âü°í

top

CacheStorePrivate Áö½Ã¾î

¼³¸í:Attempt to cache responses that the server has marked as private
¹®¹ý:CacheStorePrivate On|Off
±âº»°ª:CacheStorePrivate Off
»ç¿ëÀå¼Ò:ÁÖ¼­¹ö¼³Á¤, °¡»óÈ£½ºÆ®
»óÅÂ:Extension
¸ðµâ:mod_cache

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

Âü°í

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

top

Comments

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our mailing lists.