<-
Apache > HTTP Server > Documentation > Version 2.4 >

ġ mod_cache

ֽ ƴմϴ. ֱٿ ϼ.
:URI Ű Ͽ ijѴ.
:Experimental
:cache_module
ҽ:mod_cache.c

̴. ۾̴...

mod_cache ǻͿ ִ ̳ Ͻõ ij ִ RFC 2616 ȣȯ HTTP ij Ѵ. mod_cache Ϸ (storage management module) ʿϴ. ⺻ ġ ΰ ִ:

mod_cache_disk
ũ ڸ Ѵ.
mod_mem_cache
޸𸮱 ڸ Ѵ. mod_mem_cache ϱڸ ijϰų (heap) ü ijϴ ΰ Ѱ ϵ ִ. mod_mem_cache ڽ ijϰų, (Ͻ(reverse proxy) ˷) ProxyPass Ͽ mod_proxy ޴ ij ִ.

URI Ű ij ϰ ´. ٺȣ ijʴ´.

Support Apache!

þ

Bugfix checklist

top

õ þ

top

Sample httpd.conf

#
# ij
#
LoadModule cache_module modules/mod_cache.so

<IfModule mod_cache.c>
#LoadModule cache_disk_module modules/mod_cache_disk.so
<IfModule mod_cache_disk.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

CacheDetailHeader þ

:Add an X-Cache-Detail header to the response.
:
:ּ, ȣƮ, directory, .htaccess
:Experimental
:mod_cache

Documentation not yet translated. Please see English version of document.

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_cache_disk ϴ ũ ڸ Ѵ. cache_type fd mod_mem_cache ϴ ϱ ij Ѵ.

(Ʒ ) URL ٸ CacheEnable þ ġ ڰ û óҶ ڸ Ѵ. Ͽ CacheEnable þ ڰ ȴ.

CacheEnable mem /manual
CacheEnable fd /images
CacheEnable disk /

top

CacheHeader þ

:Add an X-Cache header to the response.
:
:ּ, ȣƮ, directory, .htaccess
:Experimental
:mod_cache

Documentation not yet translated. Please see English version of document.

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 ij ʿ , 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
:
:ּ, ȣƮ
:Experimental
:mod_cache

Documentation not yet translated. Please see English version of document.

top

CacheIgnoreURLSessionIdentifiers þ

:Ignore defined session identifiers encoded in the URL when caching
:
:ּ, ȣƮ
:Experimental
:mod_cache

Documentation not yet translated. Please see English version of document.

top

CacheKeyBaseURL þ

:Override the base URL of reverse proxied cache keys.
:
:ּ, ȣƮ
:Experimental
:mod_cache

Documentation not yet translated. Please see English version of document.

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.
:
:ּ, ȣƮ
:Experimental
:mod_cache

Documentation not yet translated. Please see English version of document.

top

CacheLockMaxAge þ

:Set the maximum possible age of a cache lock.
:
:ּ, ȣƮ
:Experimental
:mod_cache

Documentation not yet translated. Please see English version of document.

top

CacheLockPath þ

:Set the lock path directory.
:
:ּ, ȣƮ
:Experimental
:mod_cache

Documentation not yet translated. Please see English version of document.

top

CacheMaxExpire þ

: ijϴ ʴ ִð
:CacheMaxExpire seconds
⺻:CacheMaxExpire 86400 (Ϸ)
:ּ, ȣƮ
:Experimental
:mod_cache

CacheMaxExpire þ ˻ʰ ij HTTP ִ ʴ ִð Ѵ. , ִ ŭ Ǿ. ð Ͽ ִ밪 Ų.

CacheMaxExpire 604800

top

CacheMinExpire þ

:The minimum time in seconds to cache a document
:
:ּ, ȣƮ, directory, .htaccess
:Experimental
:mod_cache

Documentation not yet translated. Please see English version of document.

top

CacheQuickHandler þ

:Run the cache from the quick handler.
:
:ּ, ȣƮ
:Experimental
:mod_cache

Documentation not yet translated. Please see English version of document.

top

CacheStaleOnError þ

:Serve stale content in place of 5xx responses.
:
:ּ, ȣƮ, directory, .htaccess
:Experimental
:mod_cache

Documentation not yet translated. Please see English version of document.

top

CacheStoreExpired þ

:Attempt to cache responses that the server reports as expired
:
:ּ, ȣƮ, directory, .htaccess
:Experimental
:mod_cache

Documentation not yet translated. Please see English version of document.

top

CacheStoreNoStore þ

:Attempt to cache requests or responses that have been marked as no-store.
:
:ּ, ȣƮ, directory, .htaccess
:Experimental
:mod_cache

Documentation not yet translated. Please see English version of document.

top

CacheStorePrivate þ

:Attempt to cache responses that the server has marked as private
:
:ּ, ȣƮ, directory, .htaccess
:Experimental
:mod_cache

Documentation not yet translated. Please see English version of document.

:  en  |  fr  |  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 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.
  翻译: