Cache get keys by string pattern #52174
Unanswered
fazleyrabby
asked this question in
Ideas
Replies: 1 comment
-
I had similar issues, thus I created https://packagist.org/packages/henzeb/laravel-cache-index a while back. you can also use tags. They are still available in Laravel |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was looking for a solution to find cache keys with string pattern like this:
cache()->keys("*bundle*")
to be able to clean the cached data that matches the string pattern.Right now I am fetching the keys data by using Redis. Then looping through the data I am clearing the cache.
Here is my code snippet.

It would be really nice and quick to be able to get cache keys by using built in cache function.
Beta Was this translation helpful? Give feedback.
All reactions