InMemoryCacheDriver class
An in-memory cache driver that stores data in a local map.
This driver is useful for testing or scenarios where a simple, non-persistent, in-memory cache is sufficient.
- Inheritance
-
- Object
- CacheDriver
- InMemoryCacheDriver
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
has(
String key) → bool -
Checks if the cache contains data associated with the given
key.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String key) → Future< bool> -
Removes the cached data associated with the given
key.override -
removeAll(
) → Future< bool> -
Clears all data from the in-memory cache.
override
-
retrieve(
String key) → Json? -
Retrieves the cached data associated with the given
key.override -
store(
String key, Json data) → Future< bool> -
Stores the provided
datain the cache with the specifiedkey.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited