手册:$wgMainCacheType

This page is a translated version of the page Manual:$wgMainCacheType and the translation is 48% complete.
Other languages:
English • ‎dansk • ‎français • ‎magyar • ‎polski • ‎中文 • ‎日本語
缓存: $wgMainCacheType
对象缓存设置
引进版本:1.5.0
移除版本:仍在使用
允许的值:(One of the CACHE constants (see below), or a string indicating the cache type set as key in $wgObjectCaches)
默认值:CACHE_NONE

细节

允许配置使用的对象缓存。

Here are the keys available by default (defined as constants in Defines.php):

警告: 这可能比没有缓存要慢,即CACHE_NONE

See $wgObjectCaches for an example of a custom cache 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. 参见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_ACCEL is used if apcu is misconfigured (see 任务T147161).
  • CACHE_ACCEL only 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.

参见