X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSiteStats.php;h=6ce1aed814022e036ee0e06b50b8e6943f5f222d;hb=1326bfc813fc789935088bea572f11cca83ce8d5;hp=ac5e49e70e5853c89d0d3cc3c5b6efc86c7277ac;hpb=1a8b2ae07bd96ae663bf24421b865e04310e2306;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SiteStats.php b/includes/SiteStats.php index ac5e49e70e..6ce1aed814 100644 --- a/includes/SiteStats.php +++ b/includes/SiteStats.php @@ -189,12 +189,11 @@ class SiteStats { * @return int */ static function numberingroup( $group ) { - $cache = ObjectCache::getMainWANInstance(); + $cache = MediaWikiServices::getInstance()->getMainWANObjectCache(); return $cache->getWithSetCallback( - wfMemcKey( 'SiteStats', 'groupcounts', $group ), + $cache->makeKey( 'SiteStats', 'groupcounts', $group ), $cache::TTL_HOUR, function ( $oldValue, &$ttl, array &$setOpts ) use ( $group ) { - global $wgDisableUserGroupExpiry; $dbr = wfGetDB( DB_REPLICA ); $setOpts += Database::getCacheSetOptions( $dbr ); @@ -204,9 +203,7 @@ class SiteStats { 'COUNT(*)', [ 'ug_group' => $group, - $wgDisableUserGroupExpiry ? - '1' : - 'ug_expiry IS NULL OR ug_expiry >= ' . $dbr->addQuotes( $dbr->timestamp() ) + 'ug_expiry IS NULL OR ug_expiry >= ' . $dbr->addQuotes( $dbr->timestamp() ) ], __METHOD__ );