TtlCache<K extends Object, V extends Object> class
TTL cache (expire after duration). Roadmap #195.
Implements Cache so it is swappable with the other eviction policies behind that interface.
- Implemented types
-
- Cache<
K, V>
- Cache<
Constructors
Properties
Methods
-
clear(
) → void -
Removes all entries.
Audited: 2026-06-12 11:26 EDT
override
-
get(
K key) → V? -
Returns the value for
keyif not expired, or null. Audited: 2026-06-12 11:26 EDToverride -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
K key, V value) → void -
Stores
valueunderkeywith a fresh expiry ttl from now. Audited: 2026-06-12 11:26 EDToverride -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited