InMemoryCacheStorage class

Default in-memory cache storage.

Data is lost on app restart. Swap for a persistent implementation if needed.

Implemented types

Constructors

InMemoryCacheStorage()

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

clear() → Future<void>
Wipe the entire cache.
override
delete(String key) → Future<void>
Delete a single entry.
override
get(String key) → Future<String?>
Retrieve a previously stored value, or null if missing / expired.
override
keys() → Future<List<String>>
Return all keys (used by pattern-based invalidation).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(String key, String value, Duration ttl) → Future<void>
Store value under key with the given TTL.
override
toString() → String
A string representation of this object.
inherited

Operators

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