Skip to content

Conversation

@jackmellis
Copy link
Contributor

calling queryCache.clear() was empting the queries object but not tearing any of them down
this commit adds a clear method to the individual queries, which cancels timeouts and promises
queryCache.clear now loops through the queries and clears each one
I've also update the return type of queryCache.clear as it doesn't actually return anything

I've not added any tests as this is a very intermittent problem and I wasn't entirely sure if I could reliably reproduce the warnings. All existing tests still pass

this should solve #432 and unblock #476

Jack Ellis added 2 commits May 16, 2020 07:26
calling queryCache.clear() was empting the queries object but not tearing any of them down
this commit adds a clear method to the individual queries, which cancels timeouts and promises
queryCache.clear now loops through the queries and clears each one
I've also update the return type of queryCache.clear as it doesn't actually return anything
@jackmellis jackmellis force-pushed the fix/clear-cache-timeouts branch from 8254bd8 to 47628eb Compare May 16, 2020 06:33
@jackmellis jackmellis requested a review from tannerlinsley May 16, 2020 06:36
@tannerlinsley tannerlinsley merged commit f76c860 into TanStack:master May 17, 2020
@tannerlinsley
Copy link
Member

Nice work!

@tannerlinsley
Copy link
Member

🎉 This PR is included in version 1.5.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nx-cloud
Copy link

nx-cloud bot commented Sep 30, 2025

View your CI Pipeline Execution ↗ for commit 47628eb

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded <1s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-30 17:28:16 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants