LikeRequestRegistry class

Registry to track in-flight requests and session-stale keys (L1 Memory Cache). Matches enterprise's RequestRegistry parity.

Each LikeClient instance owns its own LikeRequestRegistry. This ensures that clients with different base URLs (e.g., created via LikeClient.copyWith) never share or corrupt each other's cache state.

Constructors

LikeRequestRegistry()

Properties

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

Methods

addInFlight(String key, (Future<Response>, CancelToken?) entry) → void
Registers an in-flight request for deduplication.
addSessionKey(String key, {Response? response}) → void
Adds a key to the session-fetched set and stores its data in the L1 RAM cache.
clear() → void
Cancels all in-flight requests and clears state.
dispose() → void
getInFlight(String key) → (Future<Response>, CancelToken?)?
Checks if a request is already in flight.
getSessionData(String key) → Response?
Retrieves a response directly from the O(1) L1 RAM cache.
invalidateKeys(Iterable<String> keys) → void
isFresh(String key, {Duration? ttl}) → bool
Checks if the data for this key is "fresh" within a given TTL.
isSessionStale(String key) → bool
Checks if a key has been fetched in the current session.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeInFlight(String key, Future<Response> owner) → bool
Removes an in-flight request only while owner still owns key.
resetSessionStale({String? path}) → void
Resets session stale keys and memory cache, optionally for a specific path prefix.
toString() → String
A string representation of this object.
inherited

Operators

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