Manual:$wgMainCacheType

From MediaWiki.org
Jump to: navigation, search
Language: English  • français
Cache: $wgMainCacheType
Object cache setting
Introduced in version: 1.5.0
Removed in version: still in use
Allowed values: One of the CACHE constants (see below)
Default value: CACHE_NONE
Other settings: Alphabetical | By function


Details[edit]

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_NONE or CACHE_ANYTHING. Otherwise use CACHE_DB.
  • 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.

See Manual:$wgObjectCaches for an example of a custom backend (e.g. Redis).

  • It was stated that CACHE_MEMCACHED directive 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

See also[edit]