MapCache<K, V> class

A Cache that's backed by a Map.

Implemented types

Constructors

MapCache({Map<K, V> map})
Creates a new MapCache, optionally using map as the backing Map.
MapCache.lru({int maximumSize})
Creates a new MapCache, using LruMap as the backing Map. Optionally specify maximumSize.
factory

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

Operators

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