Merge "Fix sessionfailure i18n message during authentication"
[lhc/web/wiklou.git] / includes / libs / objectcache / ReplicatedBagOStuff.php
index ad811c7..56b6e0e 100644 (file)
@@ -17,8 +17,8 @@
  *
  * @file
  * @ingroup Cache
- * @author Aaron Schulz
  */
+use Wikimedia\ObjectFactory;
 
 /**
  * A cache class that directs writes to one set of servers and reads to
@@ -59,12 +59,13 @@ class ReplicatedBagOStuff extends BagOStuff {
                                __METHOD__ . ': the "readFactory" parameter is required' );
                }
 
+               $opts = [ 'reportDupes' => false ]; // redundant
                $this->writeStore = ( $params['writeFactory'] instanceof BagOStuff )
                        ? $params['writeFactory']
-                       : ObjectFactory::getObjectFromSpec( $params['writeFactory'] );
+                       : ObjectFactory::getObjectFromSpec( $opts + $params['writeFactory'] );
                $this->readStore = ( $params['readFactory'] instanceof BagOStuff )
                        ? $params['readFactory']
-                       : ObjectFactory::getObjectFromSpec( $params['readFactory'] );
+                       : ObjectFactory::getObjectFromSpec( $opts + $params['readFactory'] );
                $this->attrMap = $this->mergeFlagMaps( [ $this->readStore, $this->writeStore ] );
        }