MruCache<K, V> class
A fixed-capacity cache using most-recently-used eviction.
Constructors
Properties
Methods
-
frequencyOf(
K key) → int -
Number of times
keyhas been accessed (via get or put) while resident;0if never seen or since evicted. Audited: 2026-06-12 11:26 EDT -
get(
K key) → V? -
Returns the value for
key(or null), counting the access and marking the key most-recently-used. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put(
K key, V value) → void -
Inserts or updates
keywithvalue. When the cache is full andkeyis new, the most-recently-used entry is evicted to make room. Audited: 2026-06-12 11:26 EDT -
remove(
K key) → void -
Removes
keyand its frequency, if present. Audited: 2026-06-12 11:26 EDT -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited