Replies: 1 comment
-
no.
don’t think so. I would need to see it (as in: a minimal reproduction) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using useInfiniteQuery in my Next.js project with TanStack Query (@tanstack/react-query version 5.55.4) and encountered an issue where the cached data disappears after several hours of inactivity, even though both gcTime and staleTime are set to Infinity.
Details:
Query Configuration:
In my code, I’m using useInfiniteQuery with the following configuration:
Component Code:
I also have the following component-level state and use the useSearchSchoolsFn query:
Expected Behavior:
Since I’ve set both gcTime and staleTime to Infinity, I expect the cached data to persist indefinitely and not be removed or become null after a few hours of inactivity.
Questions:
Any help or insights would be greatly appreciated. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions