From: Kunal Mehta Date: Thu, 25 May 2017 07:46:22 +0000 (-0700) Subject: SiteStats: Avoid deprecated wfMemcKey() X-Git-Tag: 1.31.0-rc.0~3127^2 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=24ad91a622163b250441a2f8a84dd17dfe260f41;p=lhc%2Fweb%2Fwiklou.git SiteStats: Avoid deprecated wfMemcKey() And the deprecated ObjectCache::getMainWANInstance() while we're at it. Change-Id: If9d9ab9c661c003a3aa6c2d956700b1870a52f41 --- diff --git a/includes/SiteStats.php b/includes/SiteStats.php index d253805589..6ce1aed814 100644 --- a/includes/SiteStats.php +++ b/includes/SiteStats.php @@ -189,9 +189,9 @@ 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 ) { $dbr = wfGetDB( DB_REPLICA );