CacheStorage<K, V> class
abstract
Interface for cache storage implementations.
This interface defines the contract that all cache storage implementations must follow, allowing for different storage backends (in-memory, file-based, etc.).
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
keys
→ Future<
List< K> > -
Returns all keys currently stored.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
size
→ Future<
int> -
Returns the number of items currently stored.
no setter
-
values
→ Future<
List< V> > -
Returns all values currently stored.
no setter
Methods
-
clear(
) → Future< void> - Clears all stored values.
-
containsKey(
K key) → Future< bool> - Checks if a key exists in the storage.
-
get(
K key) → Future< V?> - Retrieves a value by its key.
-
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.
-
remove(
K key) → Future< bool> - Removes a value by its key.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited