KeyedRequestCache<T> class

Reuses an in-flight request and its recent result for the same key.

Constructors

KeyedRequestCache({required Duration maxAge})

Properties

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

Methods

invalidate(String key) → void
Invalidates cached and in-flight values for subsequent callers.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run(String key, AsyncRequest<T> request, {bool forceRefresh = false}) Future<T>
Runs request, sharing an in-flight request for key.
toString() String
A string representation of this object.
inherited

Operators

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