CacheMap<K, T> class
Null safety
Abstract class defining a cache containing items of type T
and accessible
via a unique key of type K
Constructors
- CacheMap()
Properties
Methods
-
clear(
) → Future< void> - Removes all items
-
containsKey(
K key) → Future< bool> -
Returns if an item is available in the cache by giving its
key
-
get(
K key) → Future< T?> -
Gets an item by its key
Returns
null
if it doesn't exist -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
put(
K key, T item, {bool overrideExistingItem = true}) → Future< bool> -
Saves an item
Returns
true
if the item was saved -
remove(
K key) → Future< bool> -
Removes an item by its key
Returns
true
if the item existed and is now removed -
toString(
) → String -
A string representation of this object. [...]
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited