File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 1414class RedisStore extends TaggableStore implements LockProvider
1515{
1616 use RetrievesMultipleKeys {
17+ many as private manyAlias;
1718 putMany as private putManyAlias;
1819 }
1920
@@ -92,6 +93,11 @@ public function many(array $keys)
9293
9394 $ connection = $ this ->connection ();
9495
96+ // PredisClusterConnection does not support reading multiple values if the keys hash differently...
97+ if ($ connection instanceof PredisClusterConnection) {
98+ return $ this ->manyAlias ($ keys );
99+ }
100+
95101 $ values = $ connection ->mget (array_map (function ($ key ) {
96102 return $ this ->prefix .$ key ;
97103 }, $ keys ));
Original file line number Diff line number Diff line change 1313use Illuminate \Cache \Events \WritingKey ;
1414use Illuminate \Contracts \Cache \Store ;
1515use Illuminate \Foundation \Testing \Concerns \InteractsWithRedis ;
16- use Illuminate \Redis \Connections \PhpRedisClusterConnection ;
17- use Illuminate \Redis \Connections \PredisClusterConnection ;
1816use Illuminate \Support \Facades \Cache ;
1917use Illuminate \Support \Facades \Config ;
2018use Illuminate \Support \Facades \Event ;
@@ -33,14 +31,9 @@ protected function setUp(): void
3331
3432 $ this ->setUpRedis ();
3533
36- $ connection = $ this ->app ['redis ' ]->connection ();
37- $ this ->markTestSkippedWhen (
38- $ connection instanceof PhpRedisClusterConnection || $ connection instanceof PredisClusterConnection,
39- 'flushAll and many currently not supported for Redis Cluster connections ' ,
40- );
41-
4234 Config::set ('cache.default ' , 'redis ' );
43- Redis::flushAll ();
35+ Redis::connection (Config::get ('cache.stores.redis.connection ' ))->flushDb ();
36+ Redis::connection (Config::get ('cache.stores.redis.lock_connection ' ))->flushDb ();
4437 }
4538
4639 protected function tearDown (): void
You can’t perform that action at this time.
0 commit comments