cachette
cachette copied to clipboard
💨 Expose Get keys from RedisCache
Problem
Having access to the list of keys is important in cases where we want to manipulate the cache such as deletes based on a pattern.
Solution
Exposing keys function from Redis allow us to find keys matching a certain pattern, thus allowing the dev to seek and delete expected caches.
Potential issue
Get Keys is O(n), n is the number of keys in cache and locks the instance while looping through all items. A potential solution is to use SCAN instead. But in this case, it will only be used in connectors which won't have a lot of cached items.
P.S. I removed some internal informations from the description. If you need more information, please ping me.