Cache<K, V> class

A semi-persistent mapping of keys to values.

All access to a Cache is asynchronous because many implementations will 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. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

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

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited