BoundedLruCache<K, V> class
In-memory bounded least-recently-used (LRU) cache backed by LinkedHashMap.
Constructors
- BoundedLruCache({int maxSize = 1024})
-
Creates a BoundedLruCache with maximum entry capacity
maxSize.
Properties
Methods
-
clear(
) → void - Removes all cached entries.
-
get(
K key) → (bool, V?) -
Looks up
keyand marks it as most-recently-used when found. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put(
K key, V value) → void -
Inserts or updates
keywithvalue, evicting the least-recently-used entry if capacity is exceeded. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited