Class CachedThumbnailLoader


  • public class CachedThumbnailLoader
    extends Object
    ThumbnailLoader implementation that delegates to another loader instance and caches the loaded data on disk.
    Since:
    4.0.0
    • Constructor Detail

      • 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 use Context.getCacheDir() to cache the data.
        Parameters:
        delegate - The delegate
        cleanOnDispose - 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 delegate
        cacheDir - The folder that will be used to cache data
        cleanOnDispose - If true, cached data will be deleted when this loader disposed