Use WANObjectCache::makeKey() in ChangesFeed
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 27 Nov 2017 20:03:47 +0000 (12:03 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 27 Nov 2017 20:03:47 +0000 (12:03 -0800)
Change-Id: Ia029873e5d0883d177007555ad494cae9e00c407

includes/changes/ChangesFeed.php

index df964e0..7ac8cd0 100644 (file)
@@ -82,10 +82,11 @@ class ChangesFeed {
                        return null;
                }
 
+               $cache = ObjectCache::getMainWANInstance();
                $optionsHash = md5( serialize( $opts->getAllValues() ) ) . $wgRenderHashAppend;
-               $timekey = wfMemcKey(
+               $timekey = $cache->makeKey(
                        $this->type, $this->format, $wgLang->getCode(), $optionsHash, 'timestamp' );
-               $key = wfMemcKey( $this->type, $this->format, $wgLang->getCode(), $optionsHash );
+               $key = $cache->makeKey( $this->type, $this->format, $wgLang->getCode(), $optionsHash );
 
                FeedUtils::checkPurge( $timekey, $key );