* 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>,
)
| 383 | * ``` |
| 384 | */ |
| 385 | removeQueries<TTaggedQueryKey extends QueryKey = QueryKey>( |
| 386 | filters?: QueryFilters<TTaggedQueryKey>, |
| 387 | ): void { |
| 388 | const queryCache = this.#queryCache |
| 389 | notifyManager.batch(() => { |
| 390 | queryCache.findAll(filters).forEach((query) => { |
| 391 | queryCache.remove(query) |
| 392 | }) |
| 393 | }) |
| 394 | } |
| 395 | |
| 396 | /** |
| 397 | * Resets queries matching the given filters back to their initial state (e.g. any |
no test coverage detected