set method
void
set(
- K key,
- V value
override
Stores value under key with a fresh expiry ttl from now.
Audited: 2026-06-12 11:26 EDT
Implementation
void set(K key, V value) {
// Overwriting replaces the old expiry, which is what refreshes a re-set key.
_map[key] = (value, _now().add(_ttl));
}