public final class MemoryCacheUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Comparator<String> |
createFuzzyKeyComparator() |
static List<android.graphics.Bitmap> |
findCachedBitmapsForImageUri(String imageUri,
MemoryCache memoryCache)
Searches all bitmaps in memory cache which are corresponded to incoming URI.
Note: Memory cache can contain multiple sizes of the same image if only you didn't set denyCacheImageMultipleSizesInMemory() option in configuration |
static List<String> |
findCacheKeysForImageUri(String imageUri,
MemoryCache memoryCache)
Searches all keys in memory cache which are corresponded to incoming URI.
Note: Memory cache can contain multiple sizes of the same image if only you didn't set denyCacheImageMultipleSizesInMemory() option in configuration |
static String |
generateKey(String imageUri,
ImageSize targetSize)
Generates key for memory cache for incoming image (URI + size).
Pattern for cache key - [imageUri]_[width]x[height]. |
static void |
removeFromCache(String imageUri,
MemoryCache memoryCache)
Removes from memory cache all images for incoming URI.
Note: Memory cache can contain multiple sizes of the same image if only you didn't set denyCacheImageMultipleSizesInMemory() option in configuration |
public static String generateKey(String imageUri, ImageSize targetSize)
public static Comparator<String> createFuzzyKeyComparator()
public static List<android.graphics.Bitmap> findCachedBitmapsForImageUri(String imageUri, MemoryCache memoryCache)
denyCacheImageMultipleSizesInMemory()
option in configurationpublic static List<String> findCacheKeysForImageUri(String imageUri, MemoryCache memoryCache)
denyCacheImageMultipleSizesInMemory()
option in configurationpublic static void removeFromCache(String imageUri, MemoryCache memoryCache)
denyCacheImageMultipleSizesInMemory()
option in configurationCopyright © 2011-2015. All Rights Reserved.