private void startInputProducer(
      Consumer<EncodedImage> consumerOfPartialDiskCacheProducer,
      ProducerContext producerContext,
      CacheKey partialImageCacheKey,
      @Nullable EncodedImage partialResultFromCache) {
    Consumer<EncodedImage> consumer =
        new PartialDiskCacheConsumer(
            consumerOfPartialDiskCacheProducer,
            mDiskCachesStoreSupplier,
            partialImageCacheKey,
            mPooledByteBufferFactory,
            mByteArrayPool,
            partialResultFromCache,
            producerContext
                .getImageRequest()
                .isCacheEnabled(ImageRequest.CachesLocationsMasks.DISK_WRITE));

    mInputProducer.produceResults(consumer, producerContext);
  }
Partial disk cache producer.

<p>This producer looks in the disk cache to see if it holds part of the requested image. If the
image is found, then it is passed to the consumer as a non-final result, but an adjusted request
is still sent further along to request the remainder of the image.

<p>When the final result comes from the input producer, the two parts are stitched back together
and returned as a whole.
imagepipeline/src/main/java/com/facebook/imagepipeline/producers/PartialDiskCacheProducer.java