ImageLruDiskCache

class ImageLruDiskCache(context: Context, cacheFolder: String, maxSizeBytes: Long = 10L * 1024 * 1024)

Implementation of disk cache based on DiskLruCache.

Parameters

cacheFolder

name of the folder that will store the images of this cache. It will create a cache if none exists there.

maxSizeBytes

the maximum number of bytes this cache should use to store

See also

DiskLruCache

Throws

if reading or writing the cache directory fails

Constructors

Link copied to clipboard
constructor(context: Context, cacheFolder: String, maxSizeBytes: Long = 10L * 1024 * 1024)

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getBitmap(key: String): Bitmap?
Link copied to clipboard
fun put(key: String, data: Bitmap)