MemoryCache

interface MemoryCache<K, V>

Properties

Link copied to clipboard
abstract val keys: Set<K>

The keys present in the cache.

Link copied to clipboard
abstract val maxSize: Int

The maximum size of the cache in bytes.

Link copied to clipboard
abstract val size: Int

The current size of the cache in bytes.

Functions

Link copied to clipboard
abstract fun clear()

Remove all values from the memory cache.

Link copied to clipboard
abstract operator fun get(key: K): V?

Get the V associated with K.

Link copied to clipboard
abstract fun remove(key: K): Boolean

Remove the V referenced by K.

Link copied to clipboard
abstract operator fun set(key: K, value: V)

Set the V associated with K.