Android-BitmapCache
Android-BitmapCache copied to clipboard
Need a way to purge the DiskCache.
Add the following method to the BitmapLruCache class:
public void purgeDiskCache() {
try {
mDiskCache.delete();
} catch (IOException ex) {
ex.printStackTrace();
}
}
I need something like this too. Actually I would also like to invalidate the memory cache too. This is a very valid use case.
Consider that you are using the cache for thumbnails of videos on the device. Sometimes the video may be edited in-place, so the cache is invalidated. The edit may be done externally, so there should be a method to invalidate all cache entries at once.