AsyncCache<K, V> class
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
add(K k, V v)
→ bool
-
Add value in cache only it the element doesn't exist
Returns true when element is added otherwise false
override
-
clear()
→ void
-
Clear all entries
override
-
dispose()
→ void
-
Dispose cache
override
-
exist(K k)
→ bool
-
Returns true when the key is existing otherwise false
override
-
get(K k, {V? fallback})
→ Future<V?>
-
Get value in cache or get fallback or null
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
register(K k, Future<V> future())
→ void
-
Register future for key
override
-
remove(K k)
→ V?
-
Remove value by key
override
-
set(K k, V v)
→ bool
-
Set value in cache, if the value is present it will be overwritten
Returns true when element is overwritten otherwise false
override
-
toString()
→ String
-
A string representation of this object.
inherited
-
unregister(K k)
→ bool
-
Register future by key
Returns true when the key was existing
override
-
update(K k)
→ Future<V?>
-
Force update for a value when a future is registered
override