Jump to navigation Jump to search
|Object cache setting|
|Introduced in version:||1.5.0|
|Removed in version:||still in use|
|Allowed values:||One of the CACHE constants (see below), or a string indicating the cache type set as key in |
|Other settings: Alphabetical | By function|
Allows to configure the object cache used.
Here are the keys available by default (defined as constants in Defines.php):
CACHE_NONE– Do not cache (default).
CACHE_ANYTHING– Use $wgMessageCacheType or $wgParserCacheType if they are set to something other than
CACHE_ANYTHING. Otherwise use
CACHE_ACCEL– Use APCu or WinCache if available.
CACHE_MEMCACHED– Use memcached if available. Servers must additionally be specified in $wgMemCachedServers.
CACHE_DB– Use the database table objectcache.
- Warning: This could potentially be slower than no caching, i.e.
See $wgObjectCaches for an example of a custom cache backend (e.g. Redis).
- It was stated that
CACHE_MEMCACHEDdirective will provide the most significant performance improvements in the case where you have memcached and an opcode cache installed.
- This is just one of MediaWiki's caching settings. For best performance you may need to consider other caching settings. See performance tuning.
- Since MediaWiki 1.27, PHP sessions are stored in a cache, depending on the variable of this setting, unless overridden by $wgSessionCacheType. This may cause problems when
CACHE_ACCELis used (see task T147161).
CACHE_ACCELonly supports APCu or WinCache since MediaWiki 1.31. XCache support was removed as upstream is inactive and has no plans to move to PHP 7.