T
TanStack10mo ago
exotic-emerald

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
exotic-emerald
exotic-emeraldOP10mo ago
Can I get help here please?
conventional-tan
conventional-tan10mo ago
you are probably still subscribed to the query when you refetch it
exotic-emerald
exotic-emeraldOP10mo 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
vicious-gold
vicious-gold10mo ago
Refetching only happens when you manually refetch, or there is a subscriber. A useQuery is probably subscribed as vossmalte mentioned
adverse-sapphire
adverse-sapphire10mo ago
queryClient.removeQueries ?
adverse-sapphire
adverse-sapphire10mo 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.
From An unknown user
From An unknown user

Did you find this page helpful?