jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/357823 )

Change subject: objectcache: Use faster getArrayCopy() in WAN cache methods
......................................................................


objectcache: Use faster getArrayCopy() in WAN cache methods

Change-Id: I5f0543a59bdc59656c54fab4d7c4ae33fd233f9a
---
M includes/libs/objectcache/WANObjectCache.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/libs/objectcache/WANObjectCache.php 
b/includes/libs/objectcache/WANObjectCache.php
index 423d43ef..58e4e09 100644
--- a/includes/libs/objectcache/WANObjectCache.php
+++ b/includes/libs/objectcache/WANObjectCache.php
@@ -1109,7 +1109,7 @@
        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 +1195,7 @@
        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

-- 
To view, visit https://gerrit.wikimedia.org/r/357823
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5f0543a59bdc59656c54fab4d7c4ae33fd233f9a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to