File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -112,9 +112,11 @@ public function flush()
112112 {
113113 $ this ->event (new CacheFlushing ($ this ->getName ()));
114114
115- $ redisPrefix = match ($ this ->store ->connection ()::class) {
116- PhpRedisConnection::class => $ this ->store ->connection ()->client ()->getOption (\Redis::OPT_PREFIX ),
117- PredisConnection::class => $ this ->store ->connection ()->client ()->getOptions ()->prefix ,
115+ $ connection = $ this ->store ->connection ();
116+
117+ $ redisPrefix = match (true ) {
118+ $ connection instanceof PhpRedisConnection => $ connection ->client ()->getOption (\Redis::OPT_PREFIX ),
119+ $ connection instanceof PredisConnection => $ connection ->client ()->getOptions ()->prefix ,
118120 };
119121
120122 $ cachePrefix = $ redisPrefix .$ this ->store ->getPrefix ();
@@ -143,16 +145,13 @@ public function flush()
143145 end
144146 LUA;
145147
146- $ this -> store -> connection () ->eval (
148+ $ connection ->eval (
147149 $ script ,
148150 count ($ keysToBeDeleted ),
149151 ...$ keysToBeDeleted ,
150152 ...[$ cachePrefix , ...$ cacheTags ]
151153 );
152154
153- // $this->flushValues();
154- // $this->tags->flush();
155-
156155 $ this ->event (new CacheFlushed ($ this ->getName ()));
157156
158157 return true ;
You can’t perform that action at this time.
0 commit comments