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

Function scheduleGc

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

Source from the content-addressed store, hash-verified

12 }
13
14 protected scheduleGc(): void {
15 this.clearGcTimeout()
16
17 if (isValidTimeout(this.gcTime)) {
18 this.#gcTimeout = timeoutManager.setTimeout(() => {
19 this.optionalRemove()
20 }, this.gcTime)
21 }
22 }
23
24 protected updateGcTime(newGcTime: number | undefined): void {
25 // 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