mod_disk_cache
Content cache storage manager keyed to URIs
Extension
mod_disk_cache.c
disk_cache_module

mod_disk_cache implements a disk based storage manager. It is primarily of use in conjunction mod_cache.

Content is stored in and retrieved from the cache using URI based keys. Content with access protection is not cached.

htcacheclean can be used to maintain the cache size at a maximum level.

# Note:

mod_disk_cache requires the services of mod_cache.

CacheRoot
The directory root under which cache files are stored
CacheRoot directory
server config
virtual host

The CacheRoot directive defines the name of the directory on the disk to contain cache files. If the mod_disk_cache module has been loaded or compiled in to the Apache server, this directive must be defined. Failing to provide a value for CacheRoot will result in a configuration file processing error. The CacheDirLevels and CacheDirLength directives define the structure of the directories under the specified root directory.

CacheRoot c:/cacheroot
CacheDirLevels
The number of levels of subdirectories in the cache.
CacheDirLevels levels
CacheDirLevels 3
server config
virtual host

The CacheDirLevels directive sets the number of subdirectory levels in the cache. Cached data will be saved this many directory levels below the CacheRoot directory.

The result of CacheDirLevels* CacheDirLength must not be higher than 20.

CacheDirLevels 5
CacheDirLength
The number of characters in subdirectory names
CacheDirLength length
CacheDirLength 2
server config
virtual host

The CacheDirLength directive sets the number of characters for each subdirectory name in the cache hierarchy.

The result of CacheDirLevels* CacheDirLength must not be higher than 20.

CacheDirLength 4
CacheMinFileSize
The minimum size (in bytes) of a document to be placed in the cache
CacheMinFileSize bytes
CacheMinFileSize 1
server config
virtual host

The CacheMinFileSize directive sets the minimum size, in bytes, for a document to be considered for storage in the cache.

CacheMinFileSize 64
CacheMaxFileSize
The maximum size (in bytes) of a document to be placed in the cache
CacheMaxFileSize bytes
CacheMaxFileSize 1000000
server config
virtual host

The CacheMaxFileSize directive sets the maximum size, in bytes, for a document to be considered for storage in the cache.

CacheMaxFileSize 64000