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

Function timeUntilStale

packages/query-core/src/utils.ts:97–99  ·  view source on GitHub ↗
(updatedAt: number, staleTime?: number)

Source from the content-addressed store, hash-verified

95}
96
97export function timeUntilStale(updatedAt: number, staleTime?: number): number {
98 return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0)
99}
100
101export function resolveStaleTime<
102 TQueryFnData = unknown,

Callers 2

#updateStaleTimeoutMethod · 0.90
isStaleByTimeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…