- Overview
- Installation & Uninstallation
- Local and remote management using IIS 7
- Context and processing order
- Apache compatibility
- Modules
- core functions
- mod_antibot
- mod_asis
- mod_auth_basic
- mod_auth_digest
- mod_authn_anon
- mod_authn_dbd
- mod_authn_default
- mod_authn_file
- mod_authz_default
- mod_authz_groupfile
- mod_authz_host
- mod_authz_user
- mod_cache
- mod_dbd
- mod_deflate
- mod_developer
- mod_dir
- mod_disk_cache
- mod_env
- mod_evasive
- mod_expires
- mod_filter
- mod_gzip
- mod_headers
- mod_hotlink
- mod_linkfreeze
- mod_log_config
- mod_logio
- mod_mem_cache
- mod_mime
- mod_proxy
- mod_replace
- mod_rewrite
- mod_seo
- mod_setenvif
- mod_so
- mod_speling
- mod_usertrack
- mod_xsendfile
- Articles
- Release history
- Troubleshooting
- License agreement
mod_mem_cache
Overview
This module requires
mod_cache
to be enabled.
It acts as a supporting module for
mod_cache
and implements memory-based storage engine.
mod_mem_cache
is most useful when used to cache locally generated content or backend server content.
mod_mem_cache
uses
System.Web.Caching
class for caching.
This cache class has separate storages for each http-application (application pool).
So, for each current request
System.Web.Caching
uses the cache storage of the application which handles the request.
Similarly, cache cleaning using
cache-clear
environment variable empties
the cache for http-application of the current request (request that triggered cache cleaning).
Quick start
To enable memory-based storage engine for mod_cache use this minimum httpd.conf configuration:
CacheEnable mem /myapp/
or
myapp
direcotory .htaccess configuration:
CacheEnable mem
# or via env
SetEnv cache-enable mem
This configuration clears cache on specified request. Request must contain 'cache_clear_request' in query string:
SetEnvIf Query_String cache_clear_request cache-clear=1
Related articles and topics
- Web Caching: what is it?
- How mod_cache works?
- Guide: Example of mod_cache application
- Disk-based caching for IIS7
- mod_cache
- mod_disk_cache
- mod_env
- mod_setenvif (extended syntax supported)
- mod_expires
- mod_headers
Directives
Name | Context | Description |
---|---|---|
MCacheMaxObjectSize | S V D .h | maximum size in bytes of a document allowed in cache |
MCacheMinObjectSize | S V D .h | minimum size in bytes of a document allowed in cache |
Warning! Apache directives
-
MCacheMaxObjectCount
-
MCacheMaxStreamingBuffer
-
MCacheRemovalAlgorithm
-
MCacheSize
are not supported!
MCacheMaxObjectSize
MCacheMaxObjectSize
directive sets the maximum allowable size,
in bytes, of a document for it to be considered cacheable.
Syntax
MCacheMaxObjectSize bytes
Default
MCacheMaxObjectSize 10000000
MCacheMinObjectSize
MCacheMaxObjectSize
directive sets the minimum allowable size,
in bytes, of a document for it to be considered cacheable.
Syntax
MCacheMinObjectSize bytes
Default
MCacheMinObjectSize 0