put

fun put(key: K, value: V)

Stores value under key with a fresh age and marks the entry most recently used.

Replacing an existing key restarts its time-to-live. Inserting a new key while the cache is at maxSize first purges expired entries and then, if still full, evicts the least recently used entry.