TlruCache<K extends Comparable, V extends Object?> class

Inheritance

Constructors

TlruCache({required TlruStorage<K, V> storage, OnEvict<K, V>? onEvict, required Duration? expiration})

Properties

entries List<TlruCacheEntry<K, V>>
no setteroverride
expiration Duration
no getterinherited
hashCode int
The hash code for this object.
no setterinherited
length int
return the number of element in the cache
no setterinherited
loader LoaderFunc<K, V>
no getterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storage TlruStorage<K, V>
no getterinherited
syncLoading bool
no getterinherited

Methods

clear() → void
remove all the entry inside the cache
inherited
containsKey(K key) bool
inherited
get(K key) → V?
return the element identify by key
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(K key) → V?
inherited
set(K key, V element, {Duration? expiration}) Cache<TlruStorage<K, V>, TlruCacheEntry<K, V>, K, V>
add element in the cache at key
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](K key) → V?
return the value at key
inherited
operator []=(K key, V element) → void
assign element for key
inherited