Replies: 1 comment 1 reply
-
yes, that is what cacheTime does. If there are no observers anymore (all useQueries are unmounted), the data will be garbage collected after cacheTime. So increasing cacheTime should help. Or are you saying that e.g. page 3 of a mounted infiniteQuery will be removed somehow? Not quite sure what you mean with “do not appear on screen”... |
Beta Was this translation helpful? Give feedback.
1 reply
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 react-query to keep a normalized cache from the server. However, I'm running into a minor issue where when I normalize the results of a
useInfiniteQuery
, the items that do not appear on screen get evicted from cache aftercacheTime
.I don't necessarily want to refetch these, I just want react-query to know that one reference to those items are due to
useInfiniteQuery
even if the results are not on screen: is it possible to do something like this without having to useuseQuery
to indicate it? Thanks!Beta Was this translation helpful? Give feedback.
All reactions