Skip to content

Commit 20cf352

Browse files
committed
[12.x] flushValues for PredisCluster in RedisTaggedCache
1 parent 3494fd1 commit 20cf352

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Illuminate/Cache/RedisTaggedCache.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,14 @@ protected function flushValues()
194194
->chunk(1000);
195195

196196
foreach ($entries as $cacheKeys) {
197-
$this->store->connection()->del(...$cacheKeys);
197+
$connection = $this->store->connection();
198+
if ($connection instanceof PredisClusterConnection) {
199+
foreach ($cacheKeys as $cacheKey) {
200+
$connection->del($cacheKey);
201+
}
202+
} else {
203+
$connection->del(...$cacheKeys);
204+
}
198205
}
199206
}
200207

0 commit comments

Comments
 (0)