Fix global caching

Use a more explicit TTL_WEEK, and add the version to avoid breaking the
world if we change the format.

Bug: T227299
Change-Id: I22705496ed8541c3dd9b643d78dff8886f4ff070
This commit is contained in:
Daimona Eaytoy 2019-07-05 09:17:57 +02:00
parent 2cf7b58434
commit b2af2f0bf5

View file

@ -596,7 +596,7 @@ class AbuseFilter {
$fname = __METHOD__;
$res = MediaWikiServices::getInstance()->getMainWANObjectCache()->getWithSetCallback(
$globalRulesKey,
WANObjectCache::TTL_INDEFINITE,
WANObjectCache::TTL_WEEK,
function () use ( $group, $fname ) {
$fdb = self::getCentralDB( DB_REPLICA );
@ -614,7 +614,8 @@ class AbuseFilter {
},
[
'checkKeys' => [ $globalRulesKey ],
'lockTSE' => 300
'lockTSE' => 300,
'version' => 1
]
);