Is there a way to use disable persistent storage for only one query? #4833
-
Hello all, I am making a react native app where I have enabled the mechanism to save the data on persistent storage so when I init again the app, it loads faster using data from the cache while fetching new stuff. I have followed the docs on: However, there is a query I have for fetching avatars and I think it provokes the following warnings:
Is there a way to tell react-query not to save/load this data? I am open to other solutions, maybe I can extend the storage somehow? I really feel that storing images on the async storage should not be a big deal. I mean Whatsapp for example consumes a lot of data in order to save conversations, attachments, etc. Thank you in advance and regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
|
Beta Was this translation helpful? Give feedback.
dehydrateOptions
toPersistQueryClientProvider
to tell it to exclude a certain query: https://tanstack.com/query/v4/docs/react/plugins/persistQueryClient#persistqueryclient