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
I set gcTime to 1000, so we should expect inactive queries to disappear from the cache pretty quickly. This does not happen when we inactivate the query while it is still being fetched.
Describe the bug
I set
gcTimeto 1000, so we should expect inactive queries to disappear from the cache pretty quickly. This does not happen when we inactivate the query while it is still being fetched.Sequence.02_1.mp4
useQuery doesn't have this bug, however.
Your minimal, reproducible example
https://github.com/cirex-web/tanstack-gc-bug
Steps to reproduce
See video above
Expected behavior
I expected the query cached value to be deleted within 1s of being inactive.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
OS - macOS
Browser - Chrome
Browser Version - 129.0.6668.71
Tanstack Query adapter
react-query
TanStack Query version
v5.59.8
TypeScript version
v5.6.3
Additional context
No response