'Multiple KEYS created in Redis cache using Symfony4

I have recently started using redis in my symfony 4.4 application. And we are using the symfony cache adapter to create cache data. But after saving the cache we notice that there are 2 keys been created. The output of the KEYS command is below

127.0.0.1:6379> KEYS *club_language_4391*
1) "tzw3oxo8gG:\x00tags\x00%5Bclub_language_4391%5D%5B1%5D"
2) "tzw3oxo8gG:%5Bclub_language_4391%5D%5B1%5D"

So I have 2 doubts

  1. What is the relevance of the tags key. It doesnt have any data in it.
  2. I use this command to clear the cache using a pattern. redis-cli KEYS "*club_language_4391*" | xargs --delim='\n' redis-cli DEL The data is getting cleared from the DB, and the application will regenerate the cache, but the tags is not getting deleted. What will be effect of such an operation. I am afraid that the key with tags will get accumulated and cause problems eventually.


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source