MemoryCache

interface MemoryCache

An in-memory cache of recently loaded images.

Types

Key
Link copied to clipboard
sealed class Key : Parcelable
The cache key for an image in the memory cache.

Functions

clear
Link copied to clipboard
abstract fun clear()
Remove all values from the memory cache.
get
Link copied to clipboard
abstract operator fun get(key: MemoryCache.Key): Bitmap?
Get the Bitmap associated with key.
remove
Link copied to clipboard
abstract fun remove(key: MemoryCache.Key): Boolean
Remove the Bitmap referenced by key.
set
Link copied to clipboard
abstract operator fun set(key: MemoryCache.Key, bitmap: Bitmap)
Set the Bitmap associated with key.

Properties

maxSize
Link copied to clipboard
abstract val maxSize: Int
The maximum size of the cache in bytes.
size
Link copied to clipboard
abstract val size: Int
The current size of the cache in bytes.