Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://www.arcetri.astro.it/manual/ko/mod/mod_cache.html
Äàòà èçìåíåíèÿ: Mon Jan 21 19:44:30 2013
Äàòà èíäåêñèðîâàíèÿ: Fri Feb 28 05:59:06 2014
Êîäèðîâêà: ISO8859-5

Ïîèñêîâûå ñëîâà: ï ï ð ð ð ð ð ð ï ï ï ï ï ï ï ï
mod_cache - Apache HTTP Server
<-
Apache > HTTP Server > Documentation > Version 2.2 > È?Åò

ÎÖÖÔÔÅ È?Åò mod_cache

ÀÅÄÙ×á Î?Îþ:  en  |  ja  |  ko 

ÐÜ É?Ì-ÄÒ ÓæÍÕÖ× É?Ï?ÐÜ ÎÖÄåÄßÄé. ÓæÁéÏÅ Ê?ÀöÅØ ÃËÏûÐÊ ÏÅÎþ É?Ì-È? Ò?Àý×ßÌÌÏô.
ÌÃÈý:URIÈ? ÕÀÇÞ Ë÷Ïû×ßÏ? ÃËÏûÐË ÔÃÍ?×áÄé.
Ë?ÕÒ:Experimental
È?ÅòÈý:cache_module
ÌâÍÊÖÔÐß:mod_cache.c

ÏôÎð

ÐÜ È?ÅòÐÊ Í××øÐ?ÐÞ Ë?ÕÒÐÜÄé. É?Ì-ÄÒ ÎÖÑ? ÐëÎ?ÑïÐÜÄé...

mod_cacheÄÒ ÀÀÐÊ ÔÔ×ËÕÝÏÅ ÐæÄÒ ÃËÏûÐÜÃ? ×ÑÇßÍÓÅØ ÃËÏûÐË ÔÃÍ?×â Ì? ÐæÄÒ RFC 2616 Ø?Ø? HTTP ÃËÏûÔÃÍ?È? ÁÈ×?×áÄé. mod_cacheÈ? Ë÷Ïû×ßÇÑÈù Ð?ÐõÀ?È?È?Åò(storage management module)ÐÜ ×ÚÏô×ßÄé. ÁòÊË ÎÖÖÔÔÅ ÉøÖ?ÊËÏÅÄÒ ÅÞÀÅÑ? Ð?ÐõÀ?È?È?ÅòÐÜ ÐæÄé:

mod_disk_cache
ÄÒ Å?ÍÊÕ?ÁòÉí Ð?ÐõÀ?È?ÐêÈ? ÁÈ×?×áÄé.
mod_mem_cache
ÄÒ ÈîÈ?È?ÁòÉí Ð?ÐõÀ?È?ÐêÈ? ÁÈ×?×áÄé. mod_mem_cacheÄÒ ÖÔÐßÁòÌ?ÐêÈ? ÔÃÍ?×ßÀÕÃ? Ø?(heap) À?À?ÏÅ ÀÄÓÌÈ? ÔÃÍ?×ßÄÒ ÅÞÀÅÑ? ÉöÍÔÑï ×áÀÅÑ? ÉöÉÐÈÇÞ ÅÏÐë×ßÅÅÇß ÌÃÑ?×â Ì? ÐæÄé. mod_mem_cacheÄÒ ÐêÍÕÐÜ ËÌÊ×á ÃËÏûÐË ÔÃÍ?×ßÀÕÃ?, (Ï?×ÑÇßÍÓ(reverse proxy)ÇÞ ÎÛÇÑÑ?) ProxyPassÈ? Ë÷Ïû×ßÏ? mod_proxyÈ? Ð?×è ÅîÄì Ì-É?ÃËÏûÐË ÔÃÍ?×â Ì? ÐæÄé.

ÃËÏûÐË URIÈ? ÕôÄûÇÞ ÈÈÅ÷ ÕÀÇÞ ÔÃÍ?ÏÅ Ð?Ðõ×ßÀý ÀÅÑ?ÏÒÄé. Ñ?ÁéÊÈØ?ÀÅ ÅØ ÃËÏûÐÊ ÔÃÍ?×ßÑ?ÎÚÄÒÄé.

Ñ?ÍÓÎþÅù

ÑæÑ?

top

À?ÇÓÅØ È?ÅòÀ? Ñ?ÍÓÎþ

top

ÌÃÑ?ÏÉ

Sample httpd.conf

#
# ÏÉÑ? ÔÃÍ? ÌÃÑ?
#
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 Ñ?ÍÓÎþ

ÌÃÈý:ÈÈÁòÍÓÀ?ÐË Ñ?Ñ?×ßÑ?ÎÚÐÊ É?Ì-È? ÔÃÍ?×â ÁòÊË ÁòÀ?.
É?É:CacheDefaultExpire seconds
ÁòÊËÀ?:CacheDefaultExpire 3600 (one hour)
Ë÷ÏûÐõÌâ:ÑæÌ-É?ÌÃÑ?, ÀÅË?Ø?ÍÊÖ?
Ë?ÕÒ:Experimental
È?Åò:mod_cache

CacheDefaultExpire Ñ?ÍÓÎþÄÒ É?Ì-Ð× ÈÈÁòÍÓÀ?À? ÓæÁéÌ?Ñ?ÍÓÀ?ÐÜ Î?ÄÒ ÀöÏü É?Ì-È? ÔÃÍ?×â ÓÚÄìÐ? ÁòÊË ÍÓÀ?ÐË Ñ?Ñ?×áÄé. CacheMaxExpireÇÞ Ñ?Ñ?×á À?ÐÜ ÐÜ ÌÃÑ?ÐË É?ÍÓ×ßÑ? ÎÚÄÒÄé.

CacheDefaultExpire 86400

top

CacheDisable Ñ?ÍÓÎþ

ÌÃÈý:Ö?Ñ? URLÐË ÔÃÍ?×ßÑ? ÎÚÄÒÄé
É?É:CacheDisable url-string
Ë÷ÏûÐõÌâ:ÑæÌ-É?ÌÃÑ?, ÀÅË?Ø?ÍÊÖ?
Ë?ÕÒ:Experimental
È?Åò:mod_cache

CacheDisable Ñ?ÍÓÎþÈ? Ë÷Ïû×ßÈù mod_cacheÀÅ url-string ÐÜ×ßÐ× urlÅùÐË ÔÃÍ?×ßÑ? ÎÚÄÒÄé.

ÏÉÑ?

CacheDisable /local_files

top

CacheEnable Ñ?ÍÓÎþ

ÌÃÈý:Ñ?Ñ?×á Ð?ÐõÀ?È?ÐêÈ? Ë÷Ïû×ßÏ? Ñ?Ñ?×á URLÐË ÔÃÍ?×áÄé
É?É:CacheEnable cache_type url-string
Ë÷ÏûÐõÌâ:ÑæÌ-É?ÌÃÑ?, ÀÅË?Ø?ÍÊÖ?
Ë?ÕÒ:Experimental
È?Åò:mod_cache

CacheEnable Ñ?ÍÓÎþÈ? Ë÷Ïû×ßÈù mod_cacheÀÅ url-string ÐÜ×ß urlÅùÐË ÔÃÍ?×áÄé. ÔÃÍ? Ð?ÐõÀ?È?ÐêÄÒ 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 Ñ?ÍÓÎþ

ÌÃÈý:Õ?Æ?ÐÜÎ?Ö?ÀÅ ÔÃÍ?×ßÑ?ÎÚÄÒ ÃËÏûÐË ÏôÓË×äÐË É?ÍÓ×áÄé.
É?É:CacheIgnoreCacheControl On|Off
ÁòÊËÀ?:CacheIgnoreCacheControl Off
Ë÷ÏûÐõÌâ:ÑæÌ-É?ÌÃÑ?, ÀÅË?Ø?ÍÊÖ?
Ë?ÕÒ:Experimental
È?Åò:mod_cache

ÊÈÕû no-cacheÃ? no-store ×üÄ?À?ÐË ÀÅÑ? É?Ì-ÄÒ ÔÃÍ?ÏÅ Ð?Ðõ×ßÑ?ÎÚÄÒÄé. CacheIgnoreCacheControl Ñ?ÍÓÎþÄÒ ÐÜÇÁ ×ðÅÏÐË Ê?Àö×áÄé. CacheIgnoreCacheControl OnÐË Ë÷Ïû×ßÈù Ì-É?ÄÒ É?Ì-ÏÅ no-cacheÃ? no-store ×üÄ?À?ÐÜ ÐæÎþÅÅ É?Ì-È? ÔÃÍ?×áÄé. ÐÞÑ?ÐÜ ×ÚÏô×á É?Ì-ÄÒ ÐÄûÇÞ ÔÃÍ?×ßÑ? ÎÚÄÒÄé.

CacheIgnoreCacheControl On

top

CacheIgnoreHeaders Ñ?ÍÓÎþ

ÌÃÈý:ÔÃÍ?ÏÅ Ñ?Ñ?×á HTTP ×üÄ?(Åù)È? Ð?Ðõ×ßÑ? ÎÚÄÒÄé
É?É:CacheIgnoreHeaders header-string [header-string] ...
ÁòÊËÀ?:CacheIgnoreHeaders None
Ë÷ÏûÐõÌâ:ÑæÌ-É?ÌÃÑ?, ÀÅË?Ø?ÍÊÖ?
Ë?ÕÒ:Experimental
È?Åò:mod_cache

RFC 2616ÏÅ Å?È?Èù Ø?À?(hop-by-hop) HTTP ×üÄ?ÄÒ ÔÃÍ?ÏÅ Ð?Ðõ×ßÑ? ÎÚÄÒÄé. Ø?À? HTTP ×üÄ?ÏÅÄÒ ÄéÐÍÀ? ÀÀÐÊ ÀÝÐÜ ÐæÐÈÈ÷, CacheIgnoreHeaders ÌÃÑ?À? À?ÀøÎ?ÐÜ ÎþÆ ÀöÏüÏÅÅÅ ÔÃÍ?ÏÅ Ð?ÐõÅ×Ñ? ÎÚÄÒÄé.

CacheIgnoreHeadersÄÒ ÔÃÍ?ÏÅ Ð?Ðõ×ßÈù ÎØÅ×ÄÒ HTTP ×üÄ?È? ÓïÀÅÇÞ Ñ?Ñ?×áÄé. ÏÉÈ? ÅùÎþ, ÔýÕÀ(cookie)È? ÔÃÍ?ÏÅ Ð?Ðõ×ßÈù ÎØÅ×ÄÒ ÀöÏüÀÅ ÐæÄé.

CacheIgnoreHeadersÄÒ ÔÃÍ?ÏÅ Ð?Ðõ×ßÑ? ÎÚÐË HTTP ×üÄ?ÅùÐË À?ÉùÐÈÇÞ ÁÈÊà×á ÈåÇßÐË ÉîÄÒÄé. (RFC 2616ÏÅ Å?Æ?) ÔÃÍ?ÏÅ Ø?À? ×üÄ?ÈÈ Ð?Ðõ×ßÑ? ÎÚÐÈÇÑÈù, 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

ÊÈÕû ÓæÁéÌ?Ñ?ÐßÐÜ Î?ÄÒ É?Ì-ÄÒ ÔÃÍ?×ßÑ? ÎÚÄÒÄé. ÎþÆ ÀöÏü ÓæÁéÌ?Ñ?ÐßÐË (ÏÉÈ? ÅùÎþ mod_include ÓÃÈ?ÑïÏÅ) Ë?ÀÕÃ? ÓÃÐÍÊÞÕÝ Î?Î?ÐË Ì?ÀÅ ÐæÄé. CacheIgnoreNoLastMod Ñ?ÍÓÎþÄÒ ÓæÁéÌ?Ñ?ÐßÐÜ Î?ÄÒ É?Ì-ÅÅ ÉíÅõÍÓ ÔÃÍ?×ßÅÅÇß ÈÈÅ÷Äé. É?Ì-ÏÅ ÓæÁéÌ?Ñ?ÐßÀ? ÈÈÁòÍÓÀ?ÐÜ Î?ÄÒ ÀöÏü 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 Ñ?ÍÓÎþ

ÌÃÈý:É?Ì-È? ÔÃÍ?×ßÄÒ ÓÚÄìÐ? ÓæÄûÍÓÀ?
É?É:CacheMaxExpire seconds
ÁòÊËÀ?:CacheMaxExpire 86400 (×ßÇ÷)
Ë÷ÏûÐõÌâ:ÑæÌ-É?ÌÃÑ?, ÀÅË?Ø?ÍÊÖ?
Ë?ÕÒ:Experimental
È?Åò:mod_cache

CacheMaxExpire Ñ?ÍÓÎþÄÒ Í×Ñ? Ì-É?È? ÀÛË÷×ßÑ?ÎÚÀý ÔÃÍ?ÀÅÄÙ×á 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 Freenode, or sent to our mailing lists.