Shutterbug icon indicating copy to clipboard operation
Shutterbug copied to clipboard

Automatic deleting of files in cache > X number of days

Open kalvish21 opened this issue 11 years ago • 1 comments

SDWebImage in iOS has the ability to delete files from cache that are older than a certain number of days. Is there this functionality in Shutterbug?

kalvish21 avatar May 05 '14 17:05 kalvish21

Hi, The way the cache works in Shutterbug (taken from DiskLruCache) is the following : We define a maximum size for the cache (currently 100Mo: https://github.com/applidium/Shutterbug/blob/master/Shutterbug/src/com/applidium/shutterbug/cache/ImageCache.java#L30). If the cache would use more, we remove the Least Recently Used (LRU) objects. There is no API available currently to force the cache to delete elements if the cache is smaller than the maximum size.

acq avatar May 06 '14 08:05 acq