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ed -e 's/.*/mmapfile &/' > /www/conf/mmap.conf
: | ۽ ڵ ijѴ |
---|---|
: | CacheFile file-path [file-path] ... |
: | ּ |
: | Experimental |
: | mod_file_cache |
CacheFile
þ Ҷ
(open) ϵ ڵ ij Ѵ.
ڵ ij ڵ ݴ´(close).
Ͻýۿ Ǹ ٽ ijϱ
ؾ Ѵ.
file-path ƱԸƮ ض. ƱԸƮ
ġ URL-ϸ ȯ ڵ鷯 Ͻý ο
Ȯ ġؾ Ѵ. ѹ ʿ stat()
ýȣ ʿϱ inode ɺũ
θ . mod_alias
mod_rewrite
ۼ ϸ ٷ
ֱ ϴ.
CacheFile /usr/local/apache/htdocs/index.html
: | ۽ Ѵ |
---|---|
: | 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