apache-mod_cache - RFC 2616 compliant HTTP caching filter
||OpenMandriva Main Release x86_64
This module should be used with care, as when the CacheQuickHandler
directive is in its default value of on, the Allow and Deny directives
will be circumvented. You should not enable quick handler caching for any
content to which you wish to limit access by client host name, address or
mod_cache implements an RFC 2616 compliant HTTP content caching filter,
with support for the caching of content negotiated responses containing
the Vary header.
RFC 2616 compliant caching provides a mechanism to verify whether stale or
expired content is still fresh, and can represent a significant performance
boost when the origin server supports conditional requests by honouring
the If-None-Match HTTP request header. Content is only regenerated from
scratch when the content has changed, and not when the cached entry expires.
As a filter, mod_cache can be placed in front of content originating from
any handler, including flat files (served from a slow disk cached on a fast
disk), the output of a CGI script or dynamic content generator, or content
proxied from another server.
In the default configuration, mod_cache inserts the caching filter as far
forward as possible within the filter stack, utilising the quick handler to
bypass all per request processing when returning content to the client. In
this mode of operation, mod_cache may be thought of as a caching proxy
server bolted to the front of the webserver, while running within the
When the quick handler is switched off using the CacheQuickHandler directive,
it becomes possible to insert the CACHE filter at a point in the filter
stack chosen by the administrator. This provides the opportunity to cache
content before that content is personalised by the mod_include filter,
or optionally compressed by the mod_deflate filter.
Under normal operation, mod_cache will respond to and can be controlled by
the Cache-Control and Pragma headers sent from a client in a request, or from
a server within a response. Under exceptional circumstances, mod_cache can
be configured to override these headers and force site specific behaviour,
however such behaviour will be limited to this cache only, and will not
affect the operation of other caches that may exist between the client and
server, and as a result is not recommended unless strictly necessary.
RFC 2616 allows for the cache to return stale data while the existing
stale entry is refreshed from the origin server, and this is supported
by mod_cache when the CacheLock directive is suitably configured. Such
responses will contain a Warning HTTP header with a 110 response code.
RFC 2616 also allows a cache to return stale data when the attempt made to
refresh the stale data returns an error 500 or above, and this behaviour
is supported by default by mod_cache. Such responses will contain a Warning
HTTP header with a 111 response code.
mod_cache requires the services of one or more storage management modules. One
storage management module is included in the base Apache distribution:
Implements a disk based storage manager. Headers and bodies are stored
separately on disk, in a directory structure derived from the md5 hash of the
cached URL. Multiple content negotiated responses can be stored concurrently,
however the caching of partial content is not supported by this module. The
htcacheclean tool is provided to list cached URLs, remove cached URLs,
or to maintain the size of the disk cache within size and inode limits.
Further details, discussion, and examples, are provided in the Caching Guide.
- Enable the repository in Software Repository Picker:
- Install apache-mod_cache rpm package:
# dnf install apache-mod_cache