MapCache<K, V> class

Simple map cache using an in memory Map for its storage

No size limit, might want to use something like LruCacheSimple if you don't have full control over whats saved.

Implemented types

Constructors

MapCache()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stash Map<K, V>
Inner map for saving the cached values
final

Methods

clear() → void
Clears all values from the cache
override
delete(K key) → void
Removes the value in the cache for the key.
override
get(K key) → V?
Returns the cached value for the key, may be null if it isn't in the cache
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(K key, V value) → void
Sets the value in the cache for the key. May delete other values from the cache, depending on the implementation
override
toString() String
A string representation of this object.
inherited

Operators

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