QueryClient: stale-while-revalidate support? #3097
-
Hi team 👋 Some context and motivation: I'm currently working on a big codebase that was recently moved from a standard express server with SSRing, to NextJS. For an easier migration, the The problem we have is that when we have stale cached data, I guess I could implement this by using a mix of Any advice would be greatly appreciated 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
I think we're mixing two things here:
if that is not the case, please provide a codesandbox reproduction. |
Beta Was this translation helpful? Give feedback.
I think we're mixing two things here:
staleTime
tofetchQuery
, data will be returned if its not older than the passedstaleTime
. This is documented here:if that is not the case, please provide a codesandbox reproduction.