|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|
Object cache setting which replaced $wgUseMemCached.
Here are the keys available by default (defined as constants in Defines.php):
CACHE_ANYTHING– Use $wgMainCacheType, $wgMessageCacheType or $wgParserCacheType if they are set to something other than
CACHE_ANYTHING. Otherwise use
CACHE_NONE– Do not cache (default).
CACHE_DB– Store objects in the database table objectcache table. Warning: This could potentially be slower than no caching for $wgMainCacheType.
CACHE_MEMCACHED– memcached, must specify servers in $wgMemCachedServers.
CACHE_ACCEL– APC, APCu, WinCache or XCache if available. Note: If using
CACHE_ACCEL, increasing apc.shm_size may improve performance.
See Manual:$wgObjectCaches for an example of a custom 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 Manual:Performance tuning.
Note: 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_ACCEL is used. (task T147161)