-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
ImageCache: expiration date #381
Comments
Kingfisher is using the modification date of a file to determine the expiration. So you should be able to extend the date by modify the file. Did you try to remove that cache first and then store the same file again? (I am not sure whether it could work though..) Maybe we should use the access day instead of modification date to check the expiration. It might work better. How do you think about it? |
@onevcat thank you for reply and for great framework! remove/add should work. but it's not neat solution :) i can think about two different cache strategies:
maybe it can be a property that will allow to switch between these strategies |
Use access date instead of modification date. So, just access that image from disk will extend the expiration date for the same. Implemented in #406 |
@onevcat
Is it possible to extend expiration date for cached image on the disk?
When I try to store the same file with the same key it seems like nothing happens.
Maybe something like this could be helpful for
ImageCache
class:also it could be useful to call this method when you load file from cache (
retrieveImageForKey
).in this case recently used files won't expire
The text was updated successfully, but these errors were encountered: