From: Timo Tijhof Date: Tue, 27 Aug 2019 15:26:20 +0000 (+0100) Subject: MessageCache: Minor wgMsgCacheExpiry doc fix, and clear constant access X-Git-Tag: 1.34.0-rc.0~550^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=f084d0f194049ddccd3b1745f50dff1f3df1fa5b;p=lhc%2Fweb%2Fwiklou.git MessageCache: Minor wgMsgCacheExpiry doc fix, and clear constant access The class used is typed against BagOStuff so access the constant from there instead. Bug: T218207 Change-Id: Ie22d6aa5877fb5e8e2ae0b3be87f4b28f45ad763 --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 8341dac19a..554a2d50e4 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -3121,7 +3121,9 @@ $wgTranslateNumerals = true; $wgUseDatabaseMessages = true; /** - * Expiry time for the message cache key + * Expiry time for the message cache key, in seconds. + * + * @var int Defaults to 24 hours. */ $wgMsgCacheExpiry = 86400; diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index 93fdb162e2..c2913e5cb7 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -1090,7 +1090,7 @@ class MessageCache { $fname = __METHOD__; return $this->srvCache->getWithSetCallback( $this->srvCache->makeKey( 'messages-big', $hash, $dbKey ), - IExpiringStore::TTL_MINUTE, + BagOStuff::TTL_MINUTE, function () use ( $code, $dbKey, $hash, $fname ) { return $this->wanCache->getWithSetCallback( $this->bigMessageCacheKey( $hash, $dbKey ),