Package com.castlabs.sdk.thumbs
Class CachedThumbnailLoader
java.lang.Object
com.castlabs.sdk.thumbs.CachedThumbnailLoader
ThumbnailLoader
implementation that delegates to another loader instance
and caches the loaded data on disk.- Since:
- 4.0.0
-
Constructor Summary
ConstructorDescriptionCachedThumbnailLoader
(com.castlabs.sdk.thumbs.ThumbnailLoader delegate, boolean cleanOnDispose) Create a new instance that will delegate to the parent loader that will useContext.getCacheDir()
to cache the data.CachedThumbnailLoader
(com.castlabs.sdk.thumbs.ThumbnailLoader delegate, File cacheDir, boolean cleanOnDispose) Create a new instance that will delegate to the parent loader. -
Method Summary
-
Constructor Details
-
CachedThumbnailLoader
public CachedThumbnailLoader(@NonNull com.castlabs.sdk.thumbs.ThumbnailLoader delegate, boolean cleanOnDispose) Create a new instance that will delegate to the parent loader that will useContext.getCacheDir()
to cache the data.- Parameters:
delegate
- The delegatecleanOnDispose
- If true, cached data will be deleted when this loader is disposed
-
CachedThumbnailLoader
public CachedThumbnailLoader(@NonNull com.castlabs.sdk.thumbs.ThumbnailLoader delegate, @NonNull File cacheDir, boolean cleanOnDispose) Create a new instance that will delegate to the parent loader.- Parameters:
delegate
- The delegatecacheDir
- The folder that will be used to cache datacleanOnDispose
- If true, cached data will be deleted when this loader disposed
-
-
Method Details