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

Function updateGcTime

packages/query-core/src/removable.ts:24–30  ·  view source on GitHub ↗
(newGcTime: number | undefined)

Source from the content-addressed store, hash-verified

22 }
23
24 protected updateGcTime(newGcTime: number | undefined): void {
25 // Default to 5 minutes (Infinity for server-side) if no gcTime is set
26 this.gcTime = Math.max(
27 this.gcTime || 0,
28 newGcTime ?? (environmentManager.isServer() ? Infinity : 5 * 60 * 1000),
29 )
30 }
31
32 protected clearGcTimeout() {
33 if (this.#gcTimeout !== undefined) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected