InMemoryCache

open class InMemoryCache<K, V> : Cache<K, V> (source)

A cache implementation that stores the information in memory. The current implementation stores the values in memory in a WeakHashMap.

Parameters

<K>

The type of the key.

<V>

The type of the value.

Functions

Link copied to clipboard
open fun contains(key: K): Boolean
Link copied to clipboard
Create a new instance for a cache in memory.
Link copied to clipboard
open fun get(key: K): Optional<V>
Link copied to clipboard
open fun isEmpty(): Boolean
Link copied to clipboard
open fun put(key: K, value: V)
Link copied to clipboard
open fun remove(key: K)
Link copied to clipboard
open fun removeAll()
Link copied to clipboard
open fun size(): Long
Link copied to clipboard
open fun stats(): CacheStats