public class

SplitCachesByImageSizeDiskCachePolicy

extends Object
implements DiskCachePolicy
java.lang.Object
   ↳ com.facebook.imagepipeline.cache.SplitCachesByImageSizeDiskCachePolicy

Class Overview

Task factory to attempt to load an image from either the main or small disk cache and then fallback to the other if the first attempt was unsuccessful.

Summary

Public Constructors
SplitCachesByImageSizeDiskCachePolicy(BufferedDiskCache defaultBufferedDiskCache, BufferedDiskCache smallImageBufferedDiskCache, CacheKeyFactory cacheKeyFactory, int forceSmallCacheThresholdBytes)
Public Methods
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.
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.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.facebook.imagepipeline.cache.DiskCachePolicy

Public Constructors

public SplitCachesByImageSizeDiskCachePolicy (BufferedDiskCache defaultBufferedDiskCache, BufferedDiskCache smallImageBufferedDiskCache, CacheKeyFactory cacheKeyFactory, int forceSmallCacheThresholdBytes)

Public Methods

public 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.

public 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.