Filter queryClient's queryData for persistQueryClient #2295
Unanswered
antipalindrome
asked this question in
Ideas
Replies: 0 comments
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.
-
This idea is tied to the
persistQueryClient
, and how it currently does a 1:1 copy from the current queryData and persists it.The idea is to be able to pass filters to
persistQueryClient
that either include or exclude certain queries from thepersistQueryClient
.For my example, I have a
queryClient
that sets thequeryData
for search results. This is great for caching results for the session, but I do not want to cache these intopersistQueryClient
as this takes up a lot of space very quickly, which if you're using the localStorage persist, can run up the 5MB limit very quickly.I suppose there's the alternative of creating multiple queryClients, and using one for all the queries except for search, and exclude/include that way. But I'm thinking this could be a good alternative to that.
Anyways, just wanted to gauge interest in such a feature or if such a feature would even be accepted?
Beta Was this translation helpful? Give feedback.
All reactions