Merge "Remove "@author Aaron Schulz" annotations"
[lhc/web/wiklou.git] / includes / libs / objectcache / WANObjectCache.php
index 423d43e..ff7e91a 100644 (file)
@@ -17,7 +17,6 @@
  *
  * @file
  * @ingroup Cache
- * @author Aaron Schulz
  */
 
 use Psr\Log\LoggerAwareInterface;
@@ -202,8 +201,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
        public static function newEmpty() {
                return new self( [
                        'cache'   => new EmptyBagOStuff(),
-                       'pool'    => 'empty',
-                       'relayer' => new EventRelayerNull( [] )
+                       'pool'    => 'empty'
                ] );
        }
 
@@ -1109,7 +1107,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
        final public function getMultiWithSetCallback(
                ArrayIterator $keyedIds, $ttl, callable $callback, array $opts = []
        ) {
-               $valueKeys = array_keys( iterator_to_array( $keyedIds, true ) );
+               $valueKeys = array_keys( $keyedIds->getArrayCopy() );
                $checkKeys = isset( $opts['checkKeys'] ) ? $opts['checkKeys'] : [];
 
                // Load required keys into process cache in one go
@@ -1195,7 +1193,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
        final public function getMultiWithUnionSetCallback(
                ArrayIterator $keyedIds, $ttl, callable $callback, array $opts = []
        ) {
-               $idsByValueKey = iterator_to_array( $keyedIds, true );
+               $idsByValueKey = $keyedIds->getArrayCopy();
                $valueKeys = array_keys( $idsByValueKey );
                $checkKeys = isset( $opts['checkKeys'] ) ? $opts['checkKeys'] : [];
                unset( $opts['lockTSE'] ); // incompatible