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

hashCode → int
The hash code for this object.
no setterinherited
length → int
Number of entries currently stored.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Removes all cached entries.
get(K key) → (bool, V?)
Looks up key and 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 key with value, 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