com.facebook.imagepipeline.cache.DiskCachePolicy |
![]() |
Policy on how to read from and write to the image disk cache.
This is useful to separate from the producers how to decide which disk cache(s) to use, whether the main or small cache, and also which precise cache key(s) to look for.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract Task<EncodedImage> |
createAndStartCacheReadTask(ImageRequest imageRequest, Object callerContext, AtomicBoolean isCancelled)
Creates and starts the task to carry out a disk cache read, using whichever caches and keys are
appropriate for this policy.
| ||||||||||
abstract ImageRequest.CacheChoice |
getCacheChoiceForResult(ImageRequest imageRequest, EncodedImage encodedImage)
Determines the cache in which to store the provided image.
| ||||||||||
abstract void |
writeToCache(EncodedImage newResult, ImageRequest imageRequest, Object callerContext)
Writes the new image data to whichever cache and with whichever key is appropriate for this
policy.
|
Creates and starts the task to carry out a disk cache read, using whichever caches and keys are appropriate for this policy.
Determines the cache in which to store the provided image.
imageRequest | request which resulted in loading the image |
---|---|
encodedImage | the image to store in cache |
Writes the new image data to whichever cache and with whichever key is appropriate for this policy.