Apache HTTP Server Version 2.4

| Description: | Shared object cache (socache) based storage module for the HTTP caching filter. |
|---|---|
| Status: | Extension |
| Module Identifier: | cache_socache_module |
| Source File: | mod_cache_socache.c |
mod_cache_socache implements a shared object cache
(socache) based storage manager for mod_cache.
The headers and bodies of cached responses are combined, and stored underneath a single key in the shared object cache. A number of implementations of shared object caches are available to choose from.
Multiple content negotiated responses can be stored concurrently, however the caching of partial content is not yet supported by this module.
# Turn on caching
CacheSocache shmcb
CacheSocacheMaxSize 102400
<Location "/foo">
CacheEnable socache
</Location>
# Fall back to the disk cache
CacheSocache shmcb
CacheSocacheMaxSize 102400
<Location "/foo">
CacheEnable socache
CacheEnable disk
</Location>
mod_cache_socache requires the services of
mod_cache, which must be loaded before
mod_cache_socache.
CacheSocache
CacheSocacheMaxSize
CacheSocacheMaxTime
CacheSocacheMinTime
CacheSocacheReadSize
CacheSocacheReadTime| Description: | The shared object cache implementation to use |
|---|---|
| Syntax: | CacheSocache type[:args] |
| Context: | server config, virtual host |
| Status: | Extension |
| Module: | mod_cache_socache |
| Compatibility: | Available in Apache 2.4.5 and later |
The CacheSocache directive defines the name of
the shared object cache implementation to use, followed by optional
arguments for that implementation. A number of
implementations of shared object caches are available to choose
from.
CacheSocache shmcb
| Description: | The maximum size (in bytes) of an entry to be placed in the cache |
|---|---|
| Syntax: | CacheSocacheMaxSize bytes |
| Default: | CacheSocacheMaxSize 102400 |
| Context: | server config, virtual host, directory, .htaccess |
| Status: | Extension |
| Module: | mod_cache_socache |
| Compatibility: | Available in Apache 2.4.5 and later |
The CacheSocacheMaxSize directive sets the
maximum size, in bytes, for the combined headers and body of a document
to be considered for storage in the cache. The value must be at
least 1024 bytes. The larger the headers that
are stored alongside the body, the smaller the body may be.
The mod_cache_socache module will only attempt to
cache responses that have an explicit content length, or that are small
enough to be written in one pass. This is done to allow the
mod_cache_disk module to have an opportunity to cache
responses larger than those cacheable within
mod_cache_socache.
CacheSocacheMaxSize 102400
| Description: | The maximum time (in seconds) for a document to be placed in the cache |
|---|---|
| Syntax: | CacheSocacheMaxTime seconds |
| Default: | CacheSocacheMaxTime 86400 |
| Context: | server config, virtual host, directory, .htaccess |
| Status: | Extension |
| Module: | mod_cache_socache |
| Compatibility: | Available in Apache 2.4.5 and later |
The CacheSocacheMaxTime directive sets the
maximum freshness lifetime, in seconds, for a document to be stored in
the cache. This value overrides the freshness lifetime defined for the
document by the HTTP protocol.
CacheSocacheMaxTime 86400
| Description: | The minimum time (in seconds) for a document to be placed in the cache |
|---|---|
| Syntax: | CacheSocacheMinTime seconds |
| Default: | CacheSocacheMinTime 600 |
| Context: | server config, virtual host, directory, .htaccess |
| Status: | Extension |
| Module: | mod_cache_socache |
| Compatibility: | Available in Apache 2.4.5 and later |
The CacheSocacheMinTime directive sets the
amount of seconds beyond the freshness lifetime of the response that the
response should be cached for in the shared object cache. If a response is
only stored for its freshness lifetime, there will be no opportunity to
revalidate the response to make it fresh again.
CacheSocacheMinTime 600
| Description: | The minimum size (in bytes) of the document to read and be cached before sending the data downstream |
|---|---|
| Syntax: | CacheSocacheReadSize bytes |
| Default: | CacheSocacheReadSize 0 |
| Context: | server config, virtual host, directory, .htaccess |