CacheProviderContract class abstract interface

Implementers

Properties

config ↔ CacheConfig
The CacheConfig that governs this provider's TTL policy and invalidation behaviour. Assigned by ClientBuilder after construction. Defaults to CacheConfig.defaults so providers remain usable in tests without a full application wiring.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
name → String
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → FutureOr<void>
dispose() → FutureOr<void>
get(String? key) → FutureOr<Map<String, dynamic>?>
getHealth() → FutureOr<bool>
getMany(List<String> keys) → FutureOr<List<Map<String, dynamic>?>>
getOrFail(String key, {Exception onFail()?}) → FutureOr<Map<String, dynamic>>
has(String key) → FutureOr<bool>
init() → FutureOr<void>
inspect() → FutureOr<Map<String, dynamic>>
length() → FutureOr<int>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put<T>(String key, T object, {Duration? ttl}) → FutureOr<void>
Stores object under key.
putMany<T>(Map<String, T> object, {Duration? ttl}) → FutureOr<void>
Stores all entries from object. The optional ttl applies uniformly to every entry; pass null to let the TTL policy decide per key, Duration.zero for no expiry.
remove(String key) → FutureOr<void>
removeMany(List<String> key) → FutureOr<void>
toString() → String
A string representation of this object.
inherited
whereKeyStartsWith(String prefix) → FutureOr<Map<String, dynamic>?>
whereKeyStartsWithOrFail(String prefix, {Exception onFail()?}) → FutureOr<Map<String, dynamic>>

Operators

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