From a94e304a8c1d09de738b731b7dfb35d3c78f1e66 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Malo?= Date: Wed, 6 Nov 2002 02:16:51 +0000 Subject: [PATCH] formal: - -> - markup changes - some whitespace reformatting content: - fix directive contexts - clarify the flag directives and add default values - add short description for CacheDefaultExpire git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97418 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_cache.xml | 268 ++++++++++++++++++++-------------- 1 file changed, 155 insertions(+), 113 deletions(-) diff --git a/docs/manual/mod/mod_cache.xml b/docs/manual/mod/mod_cache.xml index ef1ca264e9..e98f804a9d 100644 --- a/docs/manual/mod/mod_cache.xml +++ b/docs/manual/mod/mod_cache.xml @@ -11,23 +11,30 @@ - This module is experimental. Documentation is still under development... + This module is experimental. Documentation is still under development... -

mod_cache implements an RFC 2616 compliant HTTP content - cache that can be used to cache either local or proxied content. - mod_cache requires the services of one or more storage + +

mod_cache implements an RFC 2616 compliant HTTP + content cache that can be used to cache either local or proxied content. + mod_cache requires the services of one or more storage management modules. Two storage management modules are included in the base Apache distribution:

mod_disk_cache
-
implements a disk based storage manager for use with mod_proxy
+
implements a disk based storage manager for use with + mod_proxy
+
mod_mem_cache
-
implements an in-memory based storage manager. mod_mem_cache - can be configured to operate in two modes: caching open file - descriptors or caching objects in heap storage. mod_mem_cache - is most useful when used to cache locally generated content or to cache - backend server content for mod_proxy configured for ProxyPass (aka reverse proxy)
+
implements an in-memory based storage manager. + mod_mem_cache can be configured to operate in two + modes: caching open file descriptors or caching objects in heap storage. + mod_mem_cache is most useful when used to cache + locally generated content or to cache backend server content for + mod_proxy configured for ProxyPass (aka reverse proxy)
+

Content stored and retrived keyed to the URL. Content with access protections is not cached.

@@ -61,198 +68,233 @@ -
Sample Configuration -Sample httpd.conf -#
-# Sample Cache Configuration
-#
-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>
- MCacheEnable mem /
- MCacheSize 4096
- MCacheMaxObjectCount 100
- MCacheMinObjectSize 1
- MCacheMaxObjectSize 2048
- </IfModule>
-
-</IfModule>
-
+
Sample Configuration + Sample httpd.conf + #
+ # Sample Cache Configuration
+ #
+ 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>
+ + MCacheEnable mem /
+ MCacheSize 4096
+ MCacheMaxObjectCount 100
+ MCacheMinObjectSize 1
+ MCacheMaxObjectSize 2048
+
+ </IfModule>
+
+ </IfModule> +
CacheEnable -Enable caching specified URLs in a specified storage manager -CacheEnable cache_type url-string -server config +Enable caching specified URLs in a specified storage +manager +CacheEnable cache_type url-string +server configvirtual host +

The CacheEnable directive instructs - mod_cache to cache urls at or below url-string. - The cache store is specified with the cache_type argument. - cache_type mem instructs mod_cache to use the - in-memory cache storage manager implemented by mod_mem_cache. - cache_type disk instructs mod_cache to use the - cache storage manager implemented by mod_disk_cache .

- - - CacheEnable disk /
- CacheEnable mem /manual
- CacheEnable fd /images
-
-
+ mod_cache to cache urls at or below + url-string. The cache store is specified with the + cache_type argument. cache_type mem + instructs mod_cache to use the in-memory cache storage + manager implemented by mod_mem_cache. + cache_type disk instructs + mod_cache to use the cache storage manager implemented + by mod_disk_cache.

+ + CacheEnable disk /
+ CacheEnable mem /manual
+ CacheEnable fd /images
+
+
CacheDisable -Disable caching of specified URLs by specified storage manager -CacheDisable cache_type url-string -server config +Disable caching of specified URLs by specified storage +manager +CacheDisable cache_type url-string +server configvirtual host +

The CacheDisable directive instructs - mod_cache to not cache urls at or above url-string.

+ mod_cache to not cache urls at or below + url-string.

-Example - CacheDisable disk /local_files - + Example + CacheDisable disk /local_files +
CacheMaxExpire The maximum time in seconds to cache a document -CacheMaxExpire seconds +CacheMaxExpire seconds CacheMaxExpire 86400 (one day) -server config +server configvirtual host + -

The maximum time in seconds to cache a document. The CacheMaxExpire - takes precedence over the Expire field from the header.

+

The maximum time in seconds to cache a document. The + CacheMaxExpire takes precedence over the + Expires field from the header.

+ - CacheMaxExpire 604800 + CacheMaxExpire 604800
+ CacheDefaultExpire -CacheDefaultExpire seconds +The default time in seconds to cache a document +CacheDefaultExpire seconds CacheDefaultExpire 3600 (one hour) -server config +server configvirtual host +

The default time in seconds to cache a document if the page does not have - an expiry date in the Expires field.

+ an expiry date in the Expires field.

+ - CacheDefaultExpire 86400 + CacheDefaultExpire 86400
CacheIgnoreNoLastMod -Ignore responses where there is no Last Modified Header -CacheIgnoreNoLastMod -server config +Ignore responses where there is no Last Modified +Header +CacheIgnoreNoLastMod On|Off +CacheIgnoreNoLastMod Off +server configvirtual host + -

Ignore responses where there is no Last Modified Header

+

Ignore responses where there is no Last Modified Header.

- CacheIgnoreNoLastMod + CacheIgnoreNoLastMod On
CacheIgnoreCacheControl -Ignore requests from the client for uncached content -CacheIgnoreCacheControl -server config +Ignore requests from the client for uncached +content +CacheIgnoreCacheControl On|Off +CacheIgnoreCacheControl Off +server configvirtual host +

Ignore requests from the client for uncached content

- CacheIgnoreNoLastMod + CacheIgnoreCacheControl On
CacheLastModifiedFactor -The factor used to estimate the Expires date from the LastModified date -CacheLastModifiedFactor float +The factor used to estimate the Expires date from the +LastModified date +CacheLastModifiedFactor float CacheLastModifiedFactor 0.1 -server config +server configvirtual host +

The factor used to estimate the Expires date from the LastModified date.

- CacheLastModifiedFactor 0.5 + CacheLastModifiedFactor 0.5
CacheForceCompletion -Percentage of download to arrive for the cache to force complete transfer -CacheForceCompletion Percentage +Percentage of download to arrive for the cache to force +complete transfer +CacheForceCompletion Percentage CacheForceCompletion 60 -server config +server configvirtual host + -

Percentage of download to arrive for the cache to force complete transfert.

+

Percentage of download to arrive for the cache to force complete transfer.

- CacheForceCompletion 80 + CacheForceCompletion 80 - -This feature is currently not implemented. - + + + This feature is currently not implemented. +
CacheMaxStreamingBuffer -Maximum amount of a streamed response to buffer in memory before declaring the response uncacheable -CacheMaxStreamingBuffer size_in_bytes +Maximum amount of a streamed response to buffer in memory +before declaring the response uncacheable +CacheMaxStreamingBuffer size_in_bytes CacheMaxStreamingBuffer 0 -server config +server configvirtual host + -

Maximum number of bytes of a streamed response (i.e., a response where -the entire content is not available all at once, such as a proxy or CGI -response) to buffer before deciding if the response is cacheable. By -default, a streamed response will not be cached unless it has a -Content-Length header. The reason for this is to avoid using a large amount -of memory to buffer a partial response that might end up being too large -to fit in the cache anyway. To enable caching of streamed responses, use -CacheMaxStreamingBuffer to specify the maximum amount of buffer space to use -per request.

- -

Note: Using a nonzero value for CacheMaxStreamingBuffer will not delay the -transmission of the response to the client. As soon as mod_cache copies a -block of streamed content into a buffer, it sends the block on to the next -output filter for delivery to the client.

- - -# Enable caching of streamed responses up to 64KB:
-CacheMaxStreamingBuffer 65536 -
+

Maximum number of bytes of a streamed response (i.e., a + response where the entire content is not available all at once, such + as a proxy or CGI response) to buffer before deciding if the response + is cacheable. By default, a streamed response will not be + cached unless it has a Content-Length header. The reason + for this is to avoid using a large amount of memory to buffer a partial + response that might end up being too large to fit in the cache anyway. + To enable caching of streamed responses, use CacheMaxStreamingBuffer to specify the maximum amount of + buffer space to use per request.

+ + Note: +

Using a nonzero value for CacheMaxStreamingBuffer will not delay the transmission + of the response to the client. As soon as mod_cache + copies a block of streamed content into a buffer, it sends the block + on to the next output filter for delivery to the client.

+
+ + + # Enable caching of streamed responses up to 64KB:
+ CacheMaxStreamingBuffer 65536 +
-- 2.40.0