MessageCache: Minor wgMsgCacheExpiry doc fix, and clear constant access
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 27 Aug 2019 15:26:20 +0000 (16:26 +0100)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 27 Aug 2019 16:23:44 +0000 (16:23 +0000)
The class used is typed against BagOStuff so access the constant
from there instead.

Bug: T218207
Change-Id: Ie22d6aa5877fb5e8e2ae0b3be87f4b28f45ad763

includes/DefaultSettings.php
includes/cache/MessageCache.php

index 8341dac..554a2d5 100644 (file)
@@ -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;
 
index 93fdb16..c2913e5 100644 (file)
@@ -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 ),