Describe the bug#
calling queryClient.removeQueries() does not actually do anything in case the queries are persisted in the localStorage using the persister from this guide: https://tanstack.com/query/latest/docs/framework/react/plugins/persistQueryClient
Your minimal, reproducible example#
i have none
Steps to reproduce#
remove query and reload page ... no changes in the localstorage and old data is loaded
Expected behavior#
i am expecting queries to be removed from persisted cache
How often does this bug happen?#
None
Screenshots or Videos#
No response
Platform#
windows chromne
Tanstack Query adapter#
None
TanStack Query version#
v5
TypeScript version#
No response
Additional context#
No response
writes are throttled per default to one per second, so if you remove + instantly close / reload the page, there's a chance that the update hasn't been written to localstorage yet. Throttle time is customizable.
If that's not the issue, please show a minimal reproduction of your problem and I'll re-open this issue.