How can I reset query cache without refetching it?
I’m trying to remove data from cache and not refetch it. I have tried reset and refetch queries.
They don’t seem to work right.
6 Replies
extended-salmonOP•13mo ago
Can I get help here please?
other-emerald•13mo ago
you are probably still subscribed to the query when you refetch it
extended-salmonOP•13mo ago
I’ve gone through the documentation several times and it seems there’s no way to just clear a particular cache
Without performing refetch after
exotic-emerald•13mo ago
Refetching only happens when you manually refetch, or there is a subscriber.
A useQuery is probably subscribed as vossmalte mentioned
optimistic-gold•13mo ago
queryClient.removeQueries ?optimistic-gold•13mo ago
TanStack | High Quality Open-Source Software for Web Developers
Headless, type-safe, powerful utilities for complex workflows like Data Management, Data Visualization, Charts, Tables, and UI Components.

