DiskCacheStrategy

abstract class DiskCacheStrategy

Set of available caching strategies for media.

Functions

Link copied to clipboard
abstract fun decodeCachedData(): Boolean
Returns true if this request should attempt to decode cached source data.
Link copied to clipboard
abstract fun decodeCachedResource(): Boolean
Returns true if this request should attempt to decode cached resource data.
Link copied to clipboard
abstract fun isDataCacheable(dataSource: DataSource): Boolean
Returns true if this request should cache the original unmodified data.
Link copied to clipboard
abstract fun isResourceCacheable(    isFromAlternateCacheKey: Boolean,     dataSource: DataSource,     encodeStrategy: EncodeStrategy): Boolean
Returns true if this request should cache the final transformed resource.

Properties

Link copied to clipboard
val ALL: DiskCacheStrategy
Caches remote data with both DATA and RESOURCE, and local data with RESOURCE only.
Link copied to clipboard
val AUTOMATIC: DiskCacheStrategy
Tries to intelligently choose a strategy based on the data source of the and the of the com.bumptech.glide.load.ResourceEncoder (if an com.bumptech.glide.load.ResourceEncoder is available).
Link copied to clipboard
val DATA: DiskCacheStrategy
Writes retrieved data directly to the disk cache before it's decoded.
Link copied to clipboard
val NONE: DiskCacheStrategy
Saves no data to cache.
Link copied to clipboard
val RESOURCE: DiskCacheStrategy
Writes resources to disk after they've been decoded.