How to use a persister with a cacheTime of zero?
I tried explicitly setting the
For example, i have an endpoint that takes a few seconds to resolve with data and that data is pretty static. I want to persist this to localStorage and cache it for 30 minutes. What
Current code:
cacheTime to 0 in the creation of the QueryClient but every time i refresh the page i see all queries being stored in local storage. I want to not do that and explicitly opt in to persisting via localstorage on a query by query basis. For example, i have an endpoint that takes a few seconds to resolve with data and that data is pretty static. I want to persist this to localStorage and cache it for 30 minutes. What
QueryClient options should i be using? what should my useQuery look like for that scenario?Current code: