Cache<K, V> class
abstract
- Implementers
Properties
- expiration ← Duration
-
no getter
- hashCode → int
-
The hash code for this object.
no setterinherited
- length → int
-
return the number of element in the cache
no setter
-
loader
← LoaderFunc<
K, V> -
no getter
-
onEvict
↔ OnEvict<
K, V> ? -
if onEvict is set that method is called whenever an entry is removed from the queue.
At the time the method is called the entry is already removed.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
storage
← Storage<
K, V> -
no getter
- syncLoading ← bool
-
no getter
Methods
-
clear(
) → void - remove all the entry inside the cache
-
containsKey(
K key) → bool -
get(
K key) → V? -
return the element identify by
key
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
K key, V element) → Cache< K, V> -
add
element
in the cache atkey
-
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
-
operator []=(
K key, V element) → void -
assign
element
forkey