Clean up newWANCacheFromParams() getInstance() calls
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 24 Oct 2016 04:01:03 +0000 (21:01 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 24 Oct 2016 04:01:03 +0000 (21:01 -0700)
Change-Id: I0daa2531708d0a110e8028c4a5641153a23c0a97

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'] );