FakeCacheProvider class final
An in-memory CacheProviderContract for use in tests.
All data is stored in store — tests can read it directly to assert on what was cached, or pre-populate it before calling the system under test.
- Implemented types
Constructors
Properties
Methods
-
clear(
) → FutureOr< void> -
override
-
dispose(
) → FutureOr< void> -
override
-
get(
String? key) → FutureOr< Map< String, dynamic> ?> -
override
-
getHealth(
) → FutureOr< bool> -
override
-
getMany(
List< String> keys) → FutureOr<List< Map< >String, dynamic> ?> -
override
-
getOrFail(
String key, {Exception onFail()?}) → FutureOr< Map< String, dynamic> > -
override
-
has(
String key) → FutureOr< bool> -
override
-
init(
) → FutureOr< void> -
override
-
inspect(
) → FutureOr< Map< String, dynamic> > -
override
-
length(
) → FutureOr< int> -
override
-
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
objectunderkey.override -
putMany<
T> (Map< String, T> object, {Duration? ttl}) → FutureOr<void> -
Stores all entries from
object. The optionalttlapplies uniformly to every entry; passnullto skip expiration.override -
remove(
String key) → FutureOr< void> -
override
-
removeMany(
List< String> keys) → FutureOr<void> -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
whereKeyStartsWith(
String prefix) → FutureOr< Map< String, dynamic> ?> -
override
-
whereKeyStartsWithOrFail(
String prefix, {Exception onFail()?}) → FutureOr< Map< String, dynamic> > -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited