File tree 1 file changed +4
-4
lines changed
src/Symfony/Component/Cache/Adapter
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -195,12 +195,12 @@ private function renameKeys(array $ids): array
195
195
$ newIds = [];
196
196
$ uniqueToken = bin2hex (random_bytes (10 ));
197
197
foreach ($ ids as $ id ) {
198
+ $ newId = '{ ' .$ id .'} ' .$ uniqueToken ;
198
199
try {
199
- $ ok = $ this ->redis ->rename ($ id , "{$ id }$ uniqueToken " );
200
-
201
- // Only take into account if ok (aka key existed), it will be false on phpredis if it did not exist
200
+ $ ok = $ this ->redis ->rename ($ id , $ newId );
202
201
if (true === $ ok || ($ ok instanceof Status && $ ok === Status::get ('OK ' ))) {
203
- $ newIds [] = "{$ id }$ uniqueToken " ;
202
+ // Only take into account if ok (key existed), will be false on phpredis if it did not exist
203
+ $ newIds [] = $ newId ;
204
204
}
205
205
} catch (\Predis \Response \ServerException $ e ) {
206
206
// Silence errors when key does not exists on Predis. Otherwise re-throw exception
You can’t perform that action at this time.
0 commit comments