* 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. * @param
(
filters?: QueryFilters<TTaggedQueryKey>,
)
| 396 | * ``` |
| 397 | */ |
| 398 | removeQueries<TTaggedQueryKey extends QueryKey = QueryKey>( |
| 399 | filters?: QueryFilters<TTaggedQueryKey>, |
| 400 | ): void { |
| 401 | const queryCache = this.#queryCache |
| 402 | notifyManager.batch(() => { |
| 403 | queryCache.findAll(filters).forEach((query) => { |
| 404 | queryCache.remove(query) |
| 405 | }) |
| 406 | }) |
| 407 | } |
| 408 | |
| 409 | /** |
| 410 | * Resets queries matching the given filters back to their initial state (e.g. any |
no test coverage detected