Stored<T> class
A cached value with its associated metadata.
Stored wraps a cached value of type T along with Metadata
that tracks versioning, TTL, and HTTP caching information.
This class is used internally by Store implementations and is returned when reading from the cache.
Example:
final stored = Stored<User>(
value: user,
meta: Metadata(
version: 1,
storedAt: DateTime.now(),
ttl: Duration(minutes: 5),
),
);
print(stored.value.name);
print(stored.meta.isExpired);
Constructors
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited