MemoizeWithTTLAsync<R> class

Creates a memoized async function with TTL (write-through cache pattern).

Constructors

MemoizeWithTTLAsync(Future<R> _fn(List args), {Duration cacheLifetime = const Duration(minutes: 5), String keyFn(List args)?})

Properties

cacheLifetime Duration
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(List args) Future<R>
clear() → void
Clear the cache and in-flight requests.
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