SIGN IN SIGN UP
TanStack / query UNCLAIMED

🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.

0 0 0 TypeScript

refactor(core): Use a Map internally for the QueryCache

* refactor(core): Use a Map internally instead of an Object + an Array

* feat(core): Allow users to provide a custom cache creator function

* test(core): Add tests for custom query cache

* refactor(core): Use public constructor parameter

* refactor(core): experimental_createStore

- rename from createCache
- expose store interface
- pass in the cache into the createStore function (this is a bit weird because cache.queries doesn't exist yet, but it does once the store is created and returned :/
- add another test that checks if the "size limit" use-case works
- mark as experimental because the interface might not be final

* oops

* refactor(core): expose cache from query

so that we can access query.queryCache to find and remove other queries

* docs: docs for custom store

* types: export the QueryStore type

* feat(custom-cache): revert exposing custom cache

most things can be done by doing queryCache.subscribe, and we can still add this later if necessary

* feat(custom-cache): cleanup forgotton export

* stabilize a test
D
Dominik Dorfmeister committed
dadf96feb219aac55a2dd5f0a8ba6b0748a74843
Parent: 24b0ddd
Committed by GitHub <noreply@github.com> on 1/11/2023, 8:38:02 PM