gcTime for queryClient.setQueryData #6488
Unanswered
james-wee-iress
asked this question in
Q&A
Replies: 1 comment 2 replies
-
it will pick up the default gcTime, wich is 5 minutes, unless you specify a different default globally or per query key with |
Beta Was this translation helpful? Give feedback.
2 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Based on this part of the documentation, it seems that
setQueryData
will have a 5 minutegcTime
if not picked up by a useQuery hook. But we have a use case where the server data will not go stale and we do not know when the server data is going to be used, but the possibility of it being used is very high.So, I wonder if there is a way to
setQueryData
with a customgcTime
like:Beta Was this translation helpful? Give feedback.
All reactions