T
TanStack12mo ago
inland-turquoise

Trying to disable caching (with gcTime & staleTime) does not seem to work

Im trying to disable cache for some queries, or all queries, but no luck so far. I have tried setting gcTime: 0 and staleTime: 0. Additionally, if i call manually refetch, it hits also cache always. Is it possible to force fetching new data somehow?
No description
3 Replies
inland-turquoise
inland-turquoiseOP12mo ago
No description
other-emerald
other-emerald12mo ago
what do you mean by "disable caching" ? disk cache is a browser level cache that's influenced by your cache-control headers, it has nothing to do with react-query if you see the request in the network tab of your browser devtools, query did it's job
inland-turquoise
inland-turquoiseOP12mo ago
hmm that is true, thanks for pointing out

Did you find this page helpful?