Support the ongoing development of Laravel.io →
posted 10 years ago
Cache

Is there any way for Laravel (4.2 or ???) to support cache partitions? What I mean by this is that I need to be able to flush "regions" of cache at once -- I may not know all the relevant keys involved.

For example, I have a cron job that iterates through some slow API lookups and I cache them, e.g. by the object ids. Laravel doesn't seem to care what key I use: the internal directory structure inside of app/storage/cache/ appears to be arbitrary. What I would like to do clear only part of the cache. E.g. clear a "subdirectory" of the cache, while leaving the other areas in tact.

Another way of putting this is: "can I retrieve all available cache keys that match a given pattern?" E.g. all keys that start with "slow_queries" etc.

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.