mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 23:40:19 +00:00
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:
parent
2cf7b58434
commit
b2af2f0bf5
|
@ -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
|
||||
]
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue