X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fchangetags%2FChangeTags.php;h=bbb5c8c4fa7a95ba553ae20f5ebc736c06e4ded1;hb=36e17cb9023fec198ea1b46504ca5ff99ef3a0af;hp=55fc1040837ae57864fb5bb062c7da0533a1932a;hpb=54a50028ec6fc423c4ac1ed894f5b311463d1f15;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php index 55fc104083..bbb5c8c4fa 100644 --- a/includes/changetags/ChangeTags.php +++ b/includes/changetags/ChangeTags.php @@ -1101,7 +1101,8 @@ class ChangeTags { }, array( 'checkKeys' => array( wfMemcKey( 'active-tags' ) ), - 'lockTSE' => INF + 'lockTSE' => 300, + 'pcTTL' => 30 ) ); } @@ -1146,7 +1147,8 @@ class ChangeTags { }, array( 'checkKeys' => array( wfMemcKey( 'valid-tags-db' ) ), - 'lockTSE' => INF + 'lockTSE' => 300, + 'pcTTL' => 30 ) ); } @@ -1173,7 +1175,8 @@ class ChangeTags { }, array( 'checkKeys' => array( wfMemcKey( 'valid-tags-hook' ) ), - 'lockTSE' => INF + 'lockTSE' => 300, + 'pcTTL' => 30 ) ); } @@ -1214,15 +1217,8 @@ class ChangeTags { * @return array Array of string => int */ public static function tagUsageStatistics() { - static $cachedStats = null; - - // Process cache to avoid I/O and repeated regens during holdoff - if ( $cachedStats !== null ) { - return $cachedStats; - } - $fname = __METHOD__; - $cachedStats = ObjectCache::getMainWANInstance()->getWithSetCallback( + return ObjectCache::getMainWANInstance()->getWithSetCallback( wfMemcKey( 'change-tag-statistics' ), 300, function ( $oldValue, &$ttl, array &$setOpts ) use ( $fname ) { @@ -1247,11 +1243,10 @@ class ChangeTags { }, array( 'checkKeys' => array( wfMemcKey( 'change-tag-statistics' ) ), - 'lockTSE' => INF + 'lockTSE' => 300, + 'pcTTL' => 30 ) ); - - return $cachedStats; } /**