-
-
Save bobz/ff1a3f28ac0ead18115c to your computer and use it in GitHub Desktop.
Remove item from ImageLoader cache.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try{ | |
imgLoader.getMemoryCache().evictAll(); | |
imgLoader.destroy(); | |
imageLoader = null; | |
DiskLruCache diskCache = DiskLruCache.open(cacheDir, 2, 2, maxSize); | |
Hasher hasher = new Hasher(); | |
String hash = hasher.hash(url); | |
diskCache.remove(hash); | |
diskCache.flush(); | |
diskCache.close(); | |
} catch (Exception e){ | |
Log.w(LOG_TAG, "Failed to remove url", e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment