InMemoryStorage<K, V> class
In-memory implementation of the cache storage interface.
This implementation stores all data in memory using a Map. It's fast but data is lost when the application terminates.
- Implemented types
-
- CacheStorage<
K, V>
- CacheStorage<
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
keys
→ Future<
List< K> > -
Returns all keys currently stored.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
size
→ Future<
int> -
Returns the number of items currently stored.
no setteroverride
-
values
→ Future<
List< V> > -
Returns all values currently stored.
no setteroverride
Methods
-
clear(
) → Future< void> -
Clears all stored values.
override
-
containsKey(
K key) → Future< bool> -
Checks if a key exists in the storage.
override
-
get(
K key) → Future< V?> -
Retrieves a value by its key.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put(
K key, V value) → Future< bool> -
Stores a value with the given key.
override
-
remove(
K key) → Future< bool> -
Removes a value by its key.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited