* Removes all queries from the cache. * @example * ```ts * const queryCache = queryClient.getQueryCache() * * queryCache.clear() * ```
()
| 252 | * ``` |
| 253 | */ |
| 254 | clear(): void { |
| 255 | notifyManager.batch(() => { |
| 256 | this.getAll().forEach((query) => { |
| 257 | this.remove(query) |
| 258 | }) |
| 259 | }) |
| 260 | } |
| 261 | |
| 262 | /** |
| 263 | * Returns the `Query` instance stored under the given `queryHash`, or `undefined` if none |