* $wgDebugPrintHttpHeaders - The default of including HTTP headers in the
debug log channel is no longer configurable. The debug log itself remains
configurable via $wgDebugLogFile.
+* $wgMsgCacheExpiry - The MessageCache uses 24 hours as the expiry for values
+ stored in WANObjectCache. This is no longer configurable.
* $wgPasswordSalt – This setting, used for migrating exceptionally old, insecure
password setups and deprecated since 1.24, is now removed.
* $wgDBOracleDRCP - If you must use persistent connections, set DBO_PERSISTENT
cleared by: Language::loadLocalisation()
Message Cache:
- backend: $wgMessageCacheType
- key: $wgDBname:messages, $wgDBname:messages-hash, $wgDBname:messages-status
- ex: wikidb:messages, wikidb:messages-hash, wikidb:messages-status
- stores: an array where the keys are DB keys and the values are messages
- set in: wfMessage(), Article::editUpdates() and Title::moveTo()
- expiry: $wgMsgCacheExpiry
- cleared by: nothing
+ See MessageCache.php.
Newtalk:
key: $wgDBname:newtalk:ip:$ip
/** How long memcached locks last */
const LOCK_TTL = 30;
+ /**
+ * Lifetime for cache, for keys stored in $wanCache, in seconds.
+ * @var int
+ */
+ const WAN_TTL = IExpiringStore::TTL_DAY;
+
/**
* Process cache of loaded messages that are defined in MediaWiki namespace
*
*/
protected $mDisable;
- /**
- * Lifetime for cache, used by object caching.
- * Set on construction, see __construct().
- */
- protected $mExpiry;
-
/**
* Message cache has its own parser which it uses to transform messages
* @var ParserOptions
* @param BagOStuff $clusterCache
* @param BagOStuff $serverCache
* @param bool $useDB Whether to look for message overrides (e.g. MediaWiki: pages)
- * @param int $expiry Lifetime for cache. @see $mExpiry.
* @param Language|null $contLang Content language of site
*/
public function __construct(
BagOStuff $clusterCache,
BagOStuff $serverCache,
$useDB,
- $expiry,
Language $contLang = null
) {
$this->wanCache = $wanCache;
$this->cache = new MapCacheLRU( 5 ); // limit size for sanity
$this->mDisable = !$useDB;
- $this->mExpiry = $expiry;
$this->contLang = $contLang ?? MediaWikiServices::getInstance()->getContentLanguage();
}
# messages larger than $wgMaxMsgCacheEntrySize, since those are only
# stored and fetched from memcache.
$cache['HASH'] = md5( serialize( $cache ) );
- $cache['EXPIRY'] = wfTimestamp( TS_MW, time() + $this->mExpiry );
+ $cache['EXPIRY'] = wfTimestamp( TS_MW, time() + self::WAN_TTL );
unset( $cache['EXCESSIVE'] ); // only needed for hash
return $cache;
$this->wanCache->set(
$this->bigMessageCacheKey( $cache['HASH'], $title ),
' ' . $newTextByTitle[$title],
- $this->mExpiry
+ self::WAN_TTL
);
}
// Mark this cache as definitely being "latest" (non-volatile) so
function () use ( $code, $dbKey, $hash, $fname ) {
return $this->wanCache->getWithSetCallback(
$this->bigMessageCacheKey( $hash, $dbKey ),
- $this->mExpiry,
+ self::WAN_TTL,
function ( $oldValue, &$ttl, &$setOpts ) use ( $dbKey, $code, $fname ) {
// Try loading the message from the database
$dbr = wfGetDB( DB_REPLICA );