From 24ad91a622163b250441a2f8a84dd17dfe260f41 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 25 May 2017 00:46:22 -0700 Subject: [PATCH] SiteStats: Avoid deprecated wfMemcKey() And the deprecated ObjectCache::getMainWANInstance() while we're at it. Change-Id: If9d9ab9c661c003a3aa6c2d956700b1870a52f41 --- includes/SiteStats.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ); -- 2.20.1