Cache

class Cache<K, V>

A simple in-memory cache implementation.

This class provides a basic key-value store for caching objects in memory. It is not thread-safe and does not implement any eviction policies.

Type Parameters

K

The type of the keys in the cache.

V

The type of the values in the cache.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun clear()
Link copied to clipboard
fun containsKey(key: K): Boolean
Link copied to clipboard
fun get(key: K): V?
Link copied to clipboard
fun put(key: K, value: V)
Link copied to clipboard
fun remove(key: K)