Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://itpm.msu.su/manual/ko/mod/mod_file_cache.html
Äàòà èçìåíåíèÿ: Sat Feb 5 01:50:17 2005
Äàòà èíäåêñèðîâàíèÿ: Mon Oct 1 23:56:33 2012
Êîäèðîâêà: ISO8859-5
mod_file_cache - Apache HTTP Server
<-
Apache > HTTP Server > Documentation > Version 2.0 > È?Åò

ÎÖÖÔÔÅ È?Åò mod_file_cache

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

ÌÃÈý:ÈîÈ?È?ÏÅ Ñ?Ð? ÖÔÐßÅùÐË ÔÃÍ?
Ë?ÕÒ:Experimental
È?ÅòÈý:file_cache_module
ÌâÍÊÖÔÐß:mod_file_cache.c

ÏôÎð

ÐÜ È?ÅòÐÊ ÑÆÍÙ×èÌ- Ë÷Ïû×èÎï ×áÄé. mod_file_cacheÈ? Ë÷Ïû×ßÏ? Ë÷ÐÜÖ?È? Î?ÈÑÐÈÇÞ ÈÈÅùÁò ÍÁÁòÆ?É?ÏÅ ÐÜ É?Ì-È? ÂÔÂÔØ? ÐàÁö ÉéÆ?Äé.

ÀÕÐ× Ê?×ßÑ? ÎÚÀý ÐêÑæ ÏôÓËÅ×ÄÒ ÖÔÐßÐË ÔÃÍ?ÏÅ Ð?Ðõ×ßÏ? Ì-É? ÊÞ×ßÈ? ÑéÐß Ì? ÐæÄé. mod_file_cacheÄÒ ÐêÑæ ÏôÓËÅ×ÄÒ Ñ?Ð? ÖÔÐßÐË ÅÞÀÅÑ? ÉöÍÔÐÈÇÞ ÔÃÍ?ÏÅ Ð?Ðõ×áÄé. ÌÃÑ? Ñ?ÍÓÎþÈ? Ë÷Ïû×ßÏ? mod_file_cacheÀÅ ÖÔÐßÐË Ï-Àý(open) mmap()×âÑ? ÎÖÄßÈù ÖÔÐßÐË Ï-Àý ÖÔÐß ×êÅùÐË Ð?Ðõ×âÑ? ÀñÑ?×áÄé. ÅÞ ÉöÍÔ È?ÅÞ ÖÔÐßÐË Ì-ÊåÍÊ×ßÁòÐ?×è ×ÚÏô×á ÐëÎ?Ð× ÐßÊÞÈ? (Ö?Ø? ÖÔÐß ÐäÓòÇÒ ÐëÎ?) ÖÔÐßÐË ÏôÓË×â Æ?ÈÆÄé ÈÕÉ? ×ßÄÒ ÄûÍÕ Ì-É?ÀÅ ÍÓÐë×âÆ? ×áÉ?ÈÈ ×ßÏ? Ì-É? ÊÞ×ßÀÅ À?Ìâ×áÄé.

ÑæÐ×: ÐÜ ÉöÉÐÊ CGI ×ÑÇÞÁçÇ?ÐÜÃ? Ö?ÊÀ×á ÃËÏû×êÅùÇ?È? Õû×è Ì-ÊåÍÊ×ßÄÒ ÖÔÐßÐ× Ì-ÊåÍÊ ÌãÅÅÈ? Ã?Ðß Ì? Î?Äé. ÐÜ ÉöÉÐÊ ÊÈÕû ÎÖÖÔÔÅ core ÃËÏû×êÅùÇ?ÀÅ Ì-ÊåÍÊ×ßÄÒ ÐßÉíÖÔÐßÏÅÈÈ Ð?ÏûÅØÄé.

ÐÜ È?ÅòÐÊ ÎÖÖÔÔÅ 1.3ÏÅ ÐæÄÒ mod_mmap_static È?ÅòÐ× ÁòÄÙÐË Ø?Ðõ×á ÀñÀ?Äé.

Ñ?ÍÓÎþÅù

ÑæÑ?

top

mod_file_cache Ë÷Ïû×ßÁò

mod_file_cacheÄÒ ÑæÌ-É? ÌÃÑ?ÏÅÌ- MMapFileÀ? CacheFile Ñ?ÍÓÎþÈ? Ë÷Ïû×ßÏ? ÌÃÑ?×á Ñ?Ð? ÖÔÐßÅùÐË ÔÃÍ?ÏÅ Ð?Ðõ×áÄé.

È?Å÷ ×ÓÇÅÖ?ÐÜ ÅÞ Ñ?ÍÓÎþÈ? È?ÅÞ Ñ?Ï?×ßÄÒ ÀÝÐÊ ÎÖÄßÄé. ÏÉÈ? ÅùÎþ, Ð?ÅÅÏüÑþÏû ÎÖÖÔÔÅÄÒ ×?Ð÷ MMapStatic Ñ?ÍÓÎþÈ? Ñ?Ï?×ßÑ? ÎÚÑ?ÈÈ, AIX ÀÀÐÊ ÄéÈ? ×ÓÇÅÖ?ÐÊ Åá È?ÅÞÈ? Ñ?Ï?×áÄé. Ñ?Ï?×ßÑ?ÎÚÄÒ Ñ?ÍÓÎþÈ? Ë÷Ïû×â ÀöÏü Ì-É? ÏÐÇ? ÇÞÁçÏÅ ÏÐÇ?É?ÐË ÃÂÁôÄé. Ñ?Ï?×ßÑ?ÎÚÄÒ Ñ?ÍÓÎþÈ? Ë÷Ïû×èÅÅ Ì-É?ÄÒ ÅÏÐë×ßÑ?ÈÈ ÖÔÐßÐË ÔÃÍ?ÏÅ Ð?Ðõ×ßÑ? ÎÚÄÒÄé. ÅÞ Ñ?ÍÓÎþÈ? È?ÅÞ Ñ?Ï?×ßÄÒ ×ÓÇÅÖ?ÐË Ë÷Ïû×áÄéÈù ÎþÆ ÉöÍÔÐÜ Ä? ÑÑÐÊÑ? Í××ø×èÊÈÆ?.

MMapFile Ñ?ÍÓÎþ

mod_file_cacheÐ× MMapFile Ñ?ÍÓÎþÄÒ ÌÃÑ?×á Ñ?Ð? ÖÔÐßÅùÐË mmap() ÍÓÍÊÕëØ?ÓòÐË Ë÷Ïû×ßÏ? ÈîÈ?È?ÏÅ ÄûÐÐ×áÄé. ÓæÍÕ Ð?ÄàÍÊÇ? ÏþÏÅÓÌÑ?Æ?Èù ÊÈÕû ÐÜ ÍÓÍÊÕëØ?ÓòÐÜ ÐæÑ?ÈÈ, Î?ÄÒ ÏþÏÅÓÌÑ?ÅÅ ÐæÄé. Æ×, mmap()×â Ì? ÐæÄÒ ÖÔÐß Õ?ÁòÏÝ ÀÃÌ?È? ÍÓÍÊÕëÐÜ Ñ?×á×â Ì? ÐæÐÈÉ×ÇÞ ÉÜÈ? Í××ø×èÊÈÄÒ ÀÝÐÜ ÑÑÄé.

Ì-É?ÄÒ ÍÓÐë×âÆ?ÏÝ Ð÷ÍÓÐë×âÆ?ÈÈ mmap()×áÄé. ÁçÇÅÌ- ÖÔÐßÍÓÍÊÕëÏÅÌ- ×èÄ÷ ÖÔÐßÑï ×ßÃ?Æ?ÅÅ Ê?ÀöÅ×Èù Ì-É?È? Ð÷ÍÓÐë×èÎï ×áÄé (ÑïÄìÀ? Ð÷ÍÓÐë É?Ì- Ò?Àý). ÄéÍÓ ÈË×èÌ- ÖÔÐßÐÜ Ê?ÀöÅ×Î?ÄÒÅ? Ì-É?È? Ð÷ÍÓÐë×ßÑ? ÎÚÐÈÈù ÏßÐ?Ø? ÐÜË?×ßÀä ÏôÓËÐË Ì-ÊåÍÊ×âÑ?ÅÅ È?È?Äé. ÐÜÐ? ÖÔÐßÐË Ñ?ÏüÀý(unlink) Áç ÐêÈ?ÏÅ Ë?ÇÞÏþ ÖÔÐßÐË ÈÈÅùÄÒ ÉöÍÔÐÈÇÞ ÖÔÐßÐË Ì?Ñ?×èÎï ×áÄé. rdistÃ? mvÏÝ ÀÀÐÊ ÄûÄéÌ?Ð× ÅÅÁÈÀÅ ÐÜÇÁ ÉöÍÔÐÈÇÞ ÅÏÐë×áÄé. ÈÕÉ? ÓïÀÅÇÞ Êâ×ÚÏô×á stat() ÀÛË÷ÀÅ ×ÚÏô×ßÀý ÐäÓòÇÒ À?ÌâÆ?ÄÒ Ï?ÇÅ Ð×ÅÅÏÅ Éí×ßÁòÆ?É?ÏÅ ÐÜ È?ÅòÐÊ ÖÔÐßÐ× Ê?Ø-È? É?ÍÓ×áÄé.

CacheFile Ñ?ÍÓÎþ

mod_file_cacheÐ× CacheFile Ñ?ÍÓÎþÄÒ ÌÃÑ? Ñ?ÍÓÎþÏÅ Ï-ÀÕ×á ÖÔÐß(À? ÖÔÐßÅù)ÐË Ï-ÎþÌ- ÖÔÐßÐ× ×êÅù(handle) Ø?ÐÊ ÖÔÐß ÁòÌ?Ðê(file descriptor)È? ÔÃÍ?ÏÅ Ð?Ðõ×áÄé. ÖÔÐßÐË ÏôÓË×ßÈù Ì-É?ÄÒ ÔÃÍ?ÏÅÌ- ×êÅùÐË Ó?ÎÖÌ- ÌâÔß API sendfile()ÏÅ (Ð?ÅÅÏüÑþÏÅÌ-ÄÒ TransmitFile()) ÃáÁôÄé.

Ì-É?ÄÒ ÍÓÐë×âÆ?ÏÝ Ð÷ÍÓÐë×âÆ?ÈÈ ÖÔÐß ×êÅùÐË ÔÃÍ?×áÄé. ÁçÇÅÌ- ÖÔÐßÍÓÍÊÕëÏÅÌ- ÔÃÍ?×á ÖÔÐßÑï ×ßÃ?Æ?ÅÅ Ê?ÀöÅ×Èù Ì-É?È? Ð÷ÍÓÐë×èÎï ×áÄé (ÑïÄìÀ? Ð÷ÍÓÐë É?Ì- Ò?Àý). ÄéÍÓ ÈË×èÌ- ÖÔÐßÐÜ Ê?ÀöÅ×Î?ÄÒÅ? Ì-É?È? Ð÷ÍÓÐë×ßÑ? ÎÚÐÈÈù ÏßÐ?Ø? ÐÜË?×ßÀä ÏôÓËÐË Ì-ÊåÍÊ×âÑ?ÅÅ È?È?Äé. ÐÜÐ? ÖÔÐßÐË Ñ?ÏüÀý(unlink) Áç ÐêÈ?ÏÅ Ë?ÇÞÏþ ÖÔÐßÐË ÈÈÅõÄÒ ÉöÍÔÐÈÇÞ ÖÔÐßÐË Ì?Ñ?×èÎï ×áÄé. rdistÃ? mvÏÝ ÀÀÐÊ ÄûÄéÌ?Ð× ÅÅÁÈÀÅ ÐÜÇÁ ÉöÍÔÐÈÇÞ ÅÏÐë×áÄé.

ÑæÐ×

Å?ÇÊÕôÈ?Ð× È?Å÷ ÖÔÐßÐË Ð÷ÁÝÐ?ÐÈÇÞ ÔÃÍ?ÏÅ Ð?Ðõ×ßÄÒ Ñ?ÍÓÎþÄÒ Î?Äé. ÄûÍÕ ÄéÐÍÀ? ÀÀÐÜ ×èÊÈÆ?... Include Ñ?ÍÓÎþÈ? Ò?Àý×ßÏ? ÄéÐÍÀ? ÀÀÐÊ ÈýÇÙÎþÈ? Í××ð×áÄé:

find /www/htdocs -type f -print \
| sed -e 's/.*/mmapfile &/' > /www/conf/mmap.conf

top

CacheFile Ñ?ÍÓÎþ

ÌÃÈý:ÍÓÐëÍÓ Ï?Ç? ÖÔÐß ×êÅùÐË ÔÃÍ?×áÄé
É?É:CacheFile file-path [file-path] ...
Ë÷ÏûÐõÌâ:ÑæÌ-É?ÌÃÑ?
Ë?ÕÒ:Experimental
È?Åò:mod_file_cache

CacheFile Ñ?ÍÓÎþÄÒ Ì-É?ÀÅ ÍÓÐë×âÆ? Ï?Ç? ÖÔÐßÐË Ï-Àý(open) ÖÔÐßÅùÐ× ×êÅùÐË ÔÃÍ?ÏÅ Ð?Ðõ×áÄé. Ì-É? ÑÎÇñÍÓ ÐêÅÏÐÈÇÞ ÔÃÍ?×á ÖÔÐßÐ× ×êÅùÐË ÄíÄÒÄé(close). ÖÔÐßÍÓÍÊÕëÏÅÌ- ÖÔÐßÐÜ Ê?ÀöÅ×Èù ÖÔÐßÐË ÄéÍÓ ÔÃÍ?×ßÁòÐ?×è Ì-É?È? Ð÷ÍÓÐë×èÎï ×áÄé.

file-path ÎÖÁäÈåÖ?È? ÑÆÍÙ×èÆ?. ÎÖÁäÈåÖ?ÄÒ ÎÖÖÔÔÅÐ× URL-ÖÔÐßÈý Ê?Ø? ×êÅùÇ?ÀÅ ÈÈÅ÷ ÖÔÐßÍÓÍÊÕë ÀöÇÞÏÝ Ñ?Ø?Ø? ÐßÔÅ×èÎï ×áÄé. ×áÉ? Ä? Êâ×ÚÏô×á stat() ÍÓÍÊÕëØ?ÓòÐÜ ×ÚÏô×ßÁòÆ?É?ÏÅ inodeÃ? ÍÙÊÌÈÅÕ? ÅþÐË ÀöÇÞÈ? Ñ?Ñ?×â Ì? Î?Äé. ÐÜ È?ÅòÐÊ mod_aliasÃ? mod_rewriteÇÞ Ð÷ÐëÌÊ×á ÖÔÐßÈýÐË ÄéÇú Ì? ÐæÁòÅÅ Î?ÁòÅÅ ×ßÄé.

ÏÉÑ?

CacheFile /usr/local/apache/htdocs/index.html

top

MMapFile Ñ?ÍÓÎþ

ÌÃÈý:ÍÓÐëÍÓ Ï?Ç? ÖÔÐßÐË ÈîÈ?È?ÏÅ ÄûÐÐ×áÄé
É?É:MMapFile file-path [file-path] ...
Ë÷ÏûÐõÌâ:ÑæÌ-É?ÌÃÑ?
Ë?ÕÒ:Experimental
È?Åò:mod_file_cache

MMapFile Ñ?ÍÓÎþÄÒ Ì-É?ÀÅ ÍÓÐë×âÆ? (À?ÉùÐÈÇÞ ÁÈÊà×á ÎÖÁäÈåÖ?ÇÞ Ñ?Ñ?×á) Ï?Ç? ÖÔÐßÐË ÈîÈ?È?ÏÅ ÄûÐÐ×áÄé(map). Ì-É? ÑÎÇñÍÓ ÐêÅÏÐÈÇÞ ÄûÐÐÐË ×?Äé(unmap). ÖÔÐßÍÓÍÊÕëÏÅÌ- ÖÔÐßÐÜ Ê?ÀöÅ×Èù ÖÔÐßÅùÐË ÄéÍÓ mmap()×ßÁòÐ?×è ÓæÌâ×á Ì-É?ÏÅ HUPÐÜÃ? USR1 ÍÓÁçÃÞÐË ÊÈÃËÎï ×áÄé.

file-path ÎÖÁäÈåÖ?È? ÑÆÍÙ×èÆ?. ÎÖÁäÈåÖ?ÄÒ ÎÖÖÔÔÅÐ× URL-ÖÔÐßÈý Ê?Ø? ×êÅùÇ?ÀÅ ÈÈÅ÷ ÖÔÐßÍÓÍÊÕë ÀöÇÞÏÝ Ñ?Ø?Ø? ÐßÔÅ×èÎï ×áÄé. ×áÉ? Ä? Êâ×ÚÏô×á stat() ÍÓÍÊÕëØ?ÓòÐÜ ×ÚÏô×ßÁòÆ?É?ÏÅ inodeÃ? ÍÙÊÌÈÅÕ? ÅþÐË ÀöÇÞÈ? Ñ?Ñ?×â Ì? Î?Äé. ÐÜ È?ÅòÐÊ mod_aliasÃ? mod_rewriteÇÞ Ð÷ÐëÌÊ×á ÖÔÐßÈýÐË ÄéÇú Ì? ÐæÁòÅÅ Î?ÁòÅÅ ×ßÄé.

ÏÉÑ?

MMapFile /usr/local/apache/htdocs/index.html

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