MemoryProvider class final
Constructors
- MemoryProvider(Env env)
Properties
- config ↔ CacheConfig
-
The
CacheConfigthat governs this provider's TTL policy and invalidation behaviour. Assigned byClientBuilderafter construction. Defaults toCacheConfig.defaultsso providers remain usable in tests without a full application wiring.getter/setter pairinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- logger → LoggerContract
-
no setter
- name → String
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → void -
dispose(
) → void -
get(
String? key) → Map< String, dynamic> ? -
getHealth(
) → bool -
getMany(
List< String> keys) → List<Map< String, dynamic> ?> -
getOrFail(
String key, {Exception onFail()?}) → Map< String, dynamic> -
has(
String key) → bool -
init(
) → void -
inspect(
) → Map< String, dynamic> -
length(
) → int -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put<
T> (String key, T object, {Duration? ttl}) → void -
Stores
objectunderkey. -
putMany<
T> (Map< String, T> objects, {Duration? ttl}) → void -
Stores all entries from
object. The optionalttlapplies uniformly to every entry; passnullto let the TTL policy decide per key,Duration.zerofor no expiry. -
remove(
String key) → void -
removeMany(
List< String> keys) → void -
toString(
) → String -
A string representation of this object.
inherited
-
whereKeyStartsWith(
String prefix) → Map< String, dynamic> -
whereKeyStartsWithOrFail(
String prefix, {Exception onFail()?}) → Map< String, dynamic>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited