Replies: 1 comment
-
Have a look at the experimental createPersister: https://tanstack.com/query/latest/docs/framework/react/plugins/createPersister#experimentalcreatepersister |
Beta Was this translation helpful? Give feedback.
0 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.
-
In my application, I use React query and IndexDB persister. When creating the
PersistQueryClientProvider
withpersistOptions
the persister provided already has a key for react query to use for caching,However, after extensive use and caching big data sets, I have experienced a big impact on loading and overall performance when a react query loads the initial data from the cache.
I am aware that I can use multiple
PersistQueryClientProvider
, but I access the cache from several areas in the application, which creates another layer of maintenance that I want to avoid.Is there a way to use the query key as the indexDB key, so every use will have its own key, not one for the whole client?
For example:
will result in two distinct entries in indexDB
Beta Was this translation helpful? Give feedback.
All reactions