Skip to content

Commit 30a2ca0

Browse files
dorrogeraynicolas-grekas
authored andcommitted
[cache] RedisTrait::doFetch should use pipeline instead of mget for Relay\Cluster
1 parent d157aa7 commit 30a2ca0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Cache/Traits/RedisTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ protected function doFetch(array $ids): iterable
434434

435435
$result = [];
436436

437-
if ($this->redis instanceof \Predis\ClientInterface && ($this->redis->getConnection() instanceof ClusterInterface || $this->redis->getConnection() instanceof Predis2ClusterInterface)) {
437+
if (($this->redis instanceof \Predis\ClientInterface && ($this->redis->getConnection() instanceof ClusterInterface || $this->redis->getConnection() instanceof Predis2ClusterInterface)) || $this->redis instanceof RelayCluster) {
438438
$values = $this->pipeline(function () use ($ids) {
439439
foreach ($ids as $id) {
440440
yield 'get' => [$id];

0 commit comments

Comments
 (0)