-
- All Implemented Interfaces:
-
com.facebook.imagepipeline.producers.Producer
public class DiskCacheReadProducer implements Producer<EncodedImage>
Disk cache read producer.
This producer looks in the disk cache for the requested image. If the image is found, then it is passed to the consumer. If the image is not found, then the request is passed to the next producer in the sequence. Any results that the producer returns are passed to the consumer.
This implementation delegates disk cache requests to BufferedDiskCache.
This producer is currently used only if the media variations experiment is turned on, to enable another producer to sit between cache read and write.
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringPRODUCER_NAMEpublic final static StringEXTRA_CACHED_VALUE_FOUNDpublic final static StringENCODED_IMAGE_SIZE
-
Constructor Summary
Constructors Constructor Description DiskCacheReadProducer(BufferedDiskCache defaultBufferedDiskCache, BufferedDiskCache smallImageBufferedDiskCache, CacheKeyFactory cacheKeyFactory, Producer<EncodedImage> inputProducer)
-
Method Summary
Modifier and Type Method Description voidproduceResults(Consumer<EncodedImage> consumer, ProducerContext producerContext)-
-
Constructor Detail
-
DiskCacheReadProducer
DiskCacheReadProducer(BufferedDiskCache defaultBufferedDiskCache, BufferedDiskCache smallImageBufferedDiskCache, CacheKeyFactory cacheKeyFactory, Producer<EncodedImage> inputProducer)
-
-
Method Detail
-
produceResults
void produceResults(Consumer<EncodedImage> consumer, ProducerContext producerContext)
-
-
-
-