MCPcopy Create free account
hub / github.com/TanStack/query / clear

Method clear

packages/query-core/src/queryClient.ts:1172–1175  ·  view source on GitHub ↗

* Clears both the query cache and the mutation cache this client is connected to. * @example * ```ts * import { QueryClient } from '@tanstack/query-core' * * const queryClient = new QueryClient() * queryClient.clear() * ```

()

Source from the content-addressed store, hash-verified

1170 * ```
1171 */
1172 clear(): void {
1173 this.#queryCache.clear()
1174 this.#mutationCache.clear()
1175 }
1176}

Callers 1

renderFunction · 0.95

Calls

no outgoing calls

Tested by 1

renderFunction · 0.76