-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for purging stale/expired cache #106
Comments
Wouldn't be more eficient to mount tmpfs on that folder? It would be also faster. |
Possibly, but I don't think that helps with the original problem - deleting expired cache files |
it may be possible to do a cron job that would remove files past certain date. |
Indeed. I came up with this inspired by how Doctrine file cache works; it's not pretty but it does the job.
|
The lifetime will often be 0, see CacheEntry::getTTL(), so you need to read the cached element:
|
It would be nice to have something ready made for this, or being able to utilise the existing methods rather than duplicating most of the code from them and rolling our own thing. |
It seems that there's no mechanism in place to purge old/expired cache entries. I'm using the Doctrine file system storage adaptor and I've run in to a situation where the disk is filling up. I don't want to simply purge everything, because some of the cache files will still be valid.
What's the best way to implement something that can do this?
The text was updated successfully, but these errors were encountered: