SiteStats: Avoid deprecated wfMemcKey()
authorKunal Mehta <legoktm@member.fsf.org>
Thu, 25 May 2017 07:46:22 +0000 (00:46 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Thu, 25 May 2017 18:20:23 +0000 (11:20 -0700)
And the deprecated ObjectCache::getMainWANInstance() while we're at it.

Change-Id: If9d9ab9c661c003a3aa6c2d956700b1870a52f41

includes/SiteStats.php

index d253805..6ce1aed 100644 (file)
@@ -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 );