Answer the question
In order to leave comments, you need to log in
How to get all keys by tag from Redis in Symfony?
Good afternoon.
Symfony project using Redis.
I need to get a list of cache keys by tag .
I use the Symfony/Cache component (RedisAdapter) for caching.
To implement tagging, I use TagAwareAdapter (I pass RedisAdapter to its constructor).
As a result, each cache key can be assigned tags and invalidate the cache by tag. But that's it, there are no more options with tags.
Has anyone solved such a problem? Maybe there is a ready-made library for working with tags in Redis using php?
Answer the question
In order to leave comments, you need to log in
Redis doesn't have a "tag" data type out of the box. Tagging is carried out at the application level, in your case it is the TagAwareAdapter library. The easiest and fastest way to find out how this library stores the tag-key bundle is to study the source code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question