Cache<K, V> class abstract

A semi-persistent mapping of keys to values.

All access to a Cache is asynchronous because implementations may store their entries in remote systems, isolates, or otherwise have to do async IO to read and write.

Implementers

Constructors

Cache()

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

get(K key, {Loader<K, V>? ifAbsent}) Future<V?>
Returns the value associated with key.
invalidate(K key) Future<void>
Removes the value associated with key. The Future completes when the operation is complete.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(K key, V value) Future<void>
Sets the value associated with key. The Future completes when the operation is complete.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited