* Removes queries from the cache that match the given filters. Unlike * QueryClient#invalidateQueries or QueryClient#refetchQueries, this removes * matching queries from the cache instead of refetching them. Without filters, every query in * the cache is removed. * * @
(
filters?: QueryFilters<TTaggedQueryKey>,
)
| 376 | * ``` |
| 377 | */ |
| 378 | removeQueries<TTaggedQueryKey extends QueryKey = QueryKey>( |
| 379 | filters?: QueryFilters<TTaggedQueryKey>, |
| 380 | ): void { |
| 381 | const queryCache = this.#queryCache |
| 382 | notifyManager.batch(() => { |
| 383 | queryCache.findAll(filters).forEach((query) => { |
| 384 | queryCache.remove(query) |
| 385 | }) |
| 386 | }) |
| 387 | } |
| 388 | |
| 389 | /** |
| 390 | * Resets queries matching the given filters back to their initial state (e.g. any |
no test coverage detected