public final class MemoryCacheUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.Comparator<java.lang.String> |
createFuzzyKeyComparator() |
static java.util.List<android.graphics.Bitmap> |
findCachedBitmapsForImageUri(java.lang.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 java.util.List<java.lang.String> |
findCacheKeysForImageUri(java.lang.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 java.lang.String |
generateKey(java.lang.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(java.lang.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 java.lang.String generateKey(java.lang.String imageUri, ImageSize targetSize)
public static java.util.Comparator<java.lang.String> createFuzzyKeyComparator()
public static java.util.List<android.graphics.Bitmap> findCachedBitmapsForImageUri(java.lang.String imageUri, MemoryCache memoryCache)
denyCacheImageMultipleSizesInMemory()
option in configurationpublic static java.util.List<java.lang.String> findCacheKeysForImageUri(java.lang.String imageUri, MemoryCache memoryCache)
denyCacheImageMultipleSizesInMemory()
option in configurationpublic static void removeFromCache(java.lang.String imageUri, MemoryCache memoryCache)
denyCacheImageMultipleSizesInMemory()
option in configuration