Cleaning expired cache #1055
pl-marasco
started this conversation in
Ideas
Replies: 2 comments
|
I totally agree, that a "clear expired" makes a lot of sense, or even "clear older than...". There is no such function right now. In general, there are probably a whole suite of cache operations that we could choose to support, if only there was time to develop them. |
0 replies
|
@martindurant thanks for the quick reaction. Once finalized the test implementation, I'll make a PR for a simple version of the cleaner. After that, if my coding reaches the minimum requirements in terms of clearness, cleanes and style, we can discuss further other minor improvements. |
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.
I'm facing a situation similar to the one described in #324. The only difference is that data must be kept in the cache up to the expiry_time and then released to save space.
The #328 has introduced the clear_cache() and a pop_from_cache() methods. Both methods, unfortunately, are not suitable for my needs. Clear_cache() delete all the files in the writable cache without any difference and pop_from_cache() does not allow removing files that are out of the expiration time.
I have searched here and there to see if there is a specific method to enable this type of cleanup, but I have not found any. Am I wrong?
I've already implemented a solution but, before doing a PR I prefer to open a discussion about the need to of implement a 'clear_expired_cache' and ask if I missed something.
All reactions