MCPcopy Index your code
hub / github.com/TanStack/query / scheduleGc

Function scheduleGc

packages/query-core/src/removable.ts:13–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11 }
12
13 protected scheduleGc(): void {
14 this.clearGcTimeout()
15
16 if (isValidTimeout(this.gcTime)) {
17 this.#gcTimeout = timeoutManager.setTimeout(() => {
18 this.optionalRemove()
19 }, this.gcTime)
20 }
21 }
22
23 protected updateGcTime(newGcTime: number | undefined): void {
24 // Default to 5 minutes (Infinity for server-side) if no gcTime is set

Callers

nothing calls this directly

Calls 3

isValidTimeoutFunction · 0.90
setTimeoutMethod · 0.80
optionalRemoveMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…