From dc97821a7833c9ab5278dd927c093efec220e5b5 Mon Sep 17 00:00:00 2001 From: Vadim Dvorovenko Date: Wed, 19 Nov 2025 23:33:22 +0700 Subject: [PATCH 1/3] [12.x] replace flushAll with flushDb in MemoizedStoreTest --- tests/Integration/Cache/MemoizedStoreTest.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/Integration/Cache/MemoizedStoreTest.php b/tests/Integration/Cache/MemoizedStoreTest.php index e9ec1b435d51..74022ea8527d 100644 --- a/tests/Integration/Cache/MemoizedStoreTest.php +++ b/tests/Integration/Cache/MemoizedStoreTest.php @@ -13,8 +13,6 @@ use Illuminate\Cache\Events\WritingKey; use Illuminate\Contracts\Cache\Store; use Illuminate\Foundation\Testing\Concerns\InteractsWithRedis; -use Illuminate\Redis\Connections\PhpRedisClusterConnection; -use Illuminate\Redis\Connections\PredisClusterConnection; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Event; @@ -33,14 +31,9 @@ protected function setUp(): void $this->setUpRedis(); - $connection = $this->app['redis']->connection(); - $this->markTestSkippedWhen( - $connection instanceof PhpRedisClusterConnection || $connection instanceof PredisClusterConnection, - 'flushAll and many currently not supported for Redis Cluster connections', - ); - Config::set('cache.default', 'redis'); - Redis::flushAll(); + Redis::connection(Config::get('cache.stores.redis.connection'))->flushDb(); + Redis::connection(Config::get('cache.stores.redis.lock_connection'))->flushDb(); } protected function tearDown(): void From 63d4989c7da8227572252db6d36928a2fdd8685d Mon Sep 17 00:00:00 2001 From: Vadim Dvorovenko Date: Sat, 8 Nov 2025 21:16:56 +0700 Subject: [PATCH 2/3] [12.x] many for RedisStore --- src/Illuminate/Cache/RedisStore.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Illuminate/Cache/RedisStore.php b/src/Illuminate/Cache/RedisStore.php index 4f18dcf5d1b9..95c01231d310 100755 --- a/src/Illuminate/Cache/RedisStore.php +++ b/src/Illuminate/Cache/RedisStore.php @@ -14,6 +14,7 @@ class RedisStore extends TaggableStore implements LockProvider { use RetrievesMultipleKeys { + many as private manyAlias; putMany as private putManyAlias; } @@ -92,6 +93,11 @@ public function many(array $keys) $connection = $this->connection(); + // PredisClusterConnection do not support reading multiple values if the keys hash differently... + if ($connection instanceof PredisClusterConnection) { + return $this->manyAlias($keys); + } + $values = $connection->mget(array_map(function ($key) { return $this->prefix.$key; }, $keys)); From 26521fa8615ddd8c7053c33f0a04344be2f32db7 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 19 Nov 2025 13:41:55 -0600 Subject: [PATCH 3/3] Update RedisStore.php --- src/Illuminate/Cache/RedisStore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Cache/RedisStore.php b/src/Illuminate/Cache/RedisStore.php index 95c01231d310..d7972768fe4f 100755 --- a/src/Illuminate/Cache/RedisStore.php +++ b/src/Illuminate/Cache/RedisStore.php @@ -93,7 +93,7 @@ public function many(array $keys) $connection = $this->connection(); - // PredisClusterConnection do not support reading multiple values if the keys hash differently... + // PredisClusterConnection does not support reading multiple values if the keys hash differently... if ($connection instanceof PredisClusterConnection) { return $this->manyAlias($keys); }