Skip to content

Commit fd67b5c

Browse files
committed
[12.x] many for RedisStore
1 parent 403294c commit fd67b5c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Illuminate/Cache/RedisStore.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
class RedisStore extends TaggableStore implements LockProvider
1515
{
1616
use RetrievesMultipleKeys {
17+
many as private manyAlias;
1718
putMany as private putManyAlias;
1819
}
1920

@@ -92,6 +93,12 @@ public function many(array $keys)
9293

9394
$connection = $this->connection();
9495

96+
// Cluster connections do not support reading multiple values if the keys hash differently...
97+
if ($connection instanceof PhpRedisClusterConnection ||
98+
$connection instanceof PredisClusterConnection) {
99+
return $this->manyAlias($keys);
100+
}
101+
95102
$values = $connection->mget(array_map(function ($key) {
96103
return $this->prefix.$key;
97104
}, $keys));

0 commit comments

Comments
 (0)