StorageAdapter class abstract
A pluggable key/value storage interface used by layers that need state to persist beyond a single process (rate-limit counters, known-device history, known-IP history, etc).
Implement this against whatever backing store fits your deployment —
Redis, a database, a distributed cache — and pass it into the layers
that accept a storage parameter. MemoryStorage is the zero-setup
default, suitable for single-instance deployments, local dev, and
tests. For multi-instance production deployments, use a shared
implementation (see RedisStorage) so state is consistent across
instances.
- Implementers
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
-
delete(
String key) → Future< void> -
Removes the value stored under
key, if any. -
get(
String key) → Future -
Retrieves the value stored under
key, ornullif absent. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
String key, dynamic value) → Future< void> -
Stores
valueunderkey, overwriting any existing value. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited