MCPcopy
hub / github.com/vercel/next.js / createSelectStaleTime

Function createSelectStaleTime

packages/next/src/server/app-render/stale-time.ts:59–65  ·  view source on GitHub ↗
(experimental: ExperimentalConfig)

Source from the content-addressed store, hash-verified

57}
58
59export function createSelectStaleTime(experimental: ExperimentalConfig) {
60 return (stale: number) =>
61 stale === INFINITE_CACHE &&
62 typeof experimental.staleTimes?.static === 'number'
63 ? experimental.staleTimes.static
64 : stale
65}
66
67/**
68 * Intercepts writes to the `stale` field on the prerender store and yields

Callers 5

renderToStreamFunction · 0.90
prerenderToStreamFunction · 0.90
collectSegmentDataFunction · 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…