Closed
Description
Symfony version(s) affected: 5.1.2
How to reproduce
$ APP_DEBUG=0 bin/console cache:pool:clear cache.app
// "SCAN" "0" "COUNT" "1000" "MATCH" "wu1MerR6oe:*" (redis-cli monitor)
$ APP_DEBUG=1 bin/console cache:pool:clear cache.app
// "SCAN" "0" "COUNT" "1000" "MATCH" "nonmBNxiVY:*" (redis-cli monitor)
Possible Solution
We can see below that the namespace keys is generated from the class name of the cache adapter.
In the CacheCollectorPass, this class can be decorated by a TraceableAdapter in debug mode. Once decoracted, the namespace changes.
symfony/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php
Lines 164 to 168 in 49eafee