Why getQueryData and getQueryChache loses the data after sometime when hydrating the queries in a server component? #6164
-
|
I'm using
I'm not sure if this is a cache thing related to Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I'd set |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
I'd set
staleTime: Infinityon the query and still calluseQuery. Without an active observer that gets created byuseQuery, data in the cache will be garbage collected after 15 minutes, because its seen as inactive. You can setgcTime(cacheTimein v4) to a higher value to avoid that.