-
- All Implemented Interfaces:
-
com.facebook.imagepipeline.cache.CacheKeyFactory
public class DefaultCacheKeyFactory implements CacheKeyFactory
Default implementation of CacheKeyFactory.
-
-
Method Summary
Modifier and Type Method Description static synchronized DefaultCacheKeyFactorygetInstance()CacheKeygetBitmapCacheKey(ImageRequest request, @Nullable() Object callerContext)CacheKeygetPostprocessedBitmapCacheKey(ImageRequest request, @Nullable() Object callerContext)CacheKeygetEncodedCacheKey(ImageRequest request, @Nullable() Object callerContext)Creates a key to be used in the encoded memory and disk caches. CacheKeygetEncodedCacheKey(ImageRequest request, Uri sourceUri, @Nullable() Object callerContext)Creates a key to be used in the encoded memory and disk caches. -
-
Method Detail
-
getInstance
static synchronized DefaultCacheKeyFactory getInstance()
-
getBitmapCacheKey
CacheKey getBitmapCacheKey(ImageRequest request, @Nullable() Object callerContext)
-
getPostprocessedBitmapCacheKey
CacheKey getPostprocessedBitmapCacheKey(ImageRequest request, @Nullable() Object callerContext)
-
getEncodedCacheKey
CacheKey getEncodedCacheKey(ImageRequest request, @Nullable() Object callerContext)
Creates a key to be used in the encoded memory and disk caches.
Implementations must return consistent values for the same request or else caches will notwork efficiently.
- Parameters:
request- the image request to be cached or queried from cachecallerContext- included for optional debugging or logging purposes only
-
getEncodedCacheKey
CacheKey getEncodedCacheKey(ImageRequest request, Uri sourceUri, @Nullable() Object callerContext)
Creates a key to be used in the encoded memory and disk caches.
This version of the method receives a specific URI which may differ from the one held by therequest. You should not consider the URI in the request.
Implementations must return consistent values for the same request or else caches will notwork efficiently.
- Parameters:
request- the image request to be cached or queried from cachesourceUri- the URI to use for the key, which may override the one held in the requestcallerContext- included for optional debugging or logging purposes only
-
-
-
-