Merge "Clean up newWANCacheFromParams() getInstance() calls"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 24 Oct 2016 23:34:31 +0000 (23:34 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 24 Oct 2016 23:34:31 +0000 (23:34 +0000)
includes/objectcache/ObjectCache.php

index 53a474b..0a4f0ed 100644 (file)
@@ -326,9 +326,9 @@ class ObjectCache {
         * @throws UnexpectedValueException
         */
        public static function newWANCacheFromParams( array $params ) {
+               $erGroup = MediaWikiServices::getInstance()->getEventRelayerGroup();
                foreach ( $params['channels'] as $action => $channel ) {
-                       $params['relayers'][$action] = MediaWikiServices::getInstance()->getEventRelayerGroup()
-                               ->getRelayer( $channel );
+                       $params['relayers'][$action] = $erGroup->getRelayer( $channel );
                        $params['channels'][$action] = $channel;
                }
                $params['cache'] = self::newFromParams( $params['store'] );