You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cancel-query prevents a cancelled initial request from retrying #4
cancel-query prevents a cancelled initial request from retrying
Summary
::rfq/cancel-query clears the fetching flags for an in-flight query, but it
does not mark the cache entry stale. If the cancelled request was the initial
request, the entry remains in :loading state with :fetching? false and :stale? false. A later ::rfq/ensure-query treats that entry as fresh and
does not issue another request.
The second ensure-query does not start a new request.
Expected behavior
Logical cancellation should invalidate the current attempt. The cache entry
should remain stale when an attempt was in flight:
{:status:loading:fetching?false:stale?true}
A later ensure-query should start a new attempt, while the cancelled
response must still be ignored if it arrives later.
Proposed fix
In re-frame.query.db/cancel-query, detect whether any request flag is active
(:fetching?, :fetching-next?, or :fetching-prev?) and associate :stale? true when cancelling an in-flight attempt. Preserve the existing
status and data behavior, and keep cancellation a no-op for uncached queries.
Activity
fix: keep cancelled initial queries retryable
fix: keep cancelled initial queries retryable
fix: keep cancelled initial queries retryable