RequestDeduplicator class
Handles request deduplication to avoid duplicate requests for the same key
//TODO: THINK ABOUT THE FUTURES THAT ARE STILL RUNNING WHEN WE REBUILD THE CACHE ISNTANCE - NEED SOME WAY TO CANCEL THE FUTURE
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
inflightKeys
→ List<
String> -
Get all inflight request keys
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearAllInflightRequests(
) → void - Clear all inflight requests
-
executeWithDeduplication<
T> (String key, Future< T> requestFn()) → Future<T> - Register a request by its key. If it is already running - return the existing instance
-
getInflightRequest<
T> (String key) → Future< T> ? - Get the inflight request for this key if it exists
-
hasInflightRequest(
String key) → bool - Check if there's an inflight request for this key
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeInflightRequest(
String key) → void - Remove inflight request for a key
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited