PerpetualCache

PerpetualCache caches the items perpetually unless they're manually removeed.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val size: Int

The number of the items that are currently cached.

Functions

Link copied to clipboard
open override fun clear()

Remove all the items in the cache.

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

Get the cached value of a given key, or null if it's not cached or evicted.

Link copied to clipboard
open override fun remove(key: K): V?

Remove the value of the key from the cache, and return the removed value, or null if it's not cached at all.

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

Cache a value with a given key