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

Function formatCacheStatus

packages/next/src/server/dev/log-requests.ts:222–234  ·  view source on GitHub ↗
(cacheStatus: FetchMetric['cacheStatus'])

Source from the content-addressed store, hash-verified

220}
221
222function formatCacheStatus(cacheStatus: FetchMetric['cacheStatus']): string {
223 switch (cacheStatus) {
224 case 'hmr':
225 return green('(HMR cache)')
226 case 'hit':
227 return green('(cache hit)')
228 case 'miss':
229 case 'skip':
230 return yellow(`(cache ${cacheStatus})`)
231 default:
232 return cacheStatus satisfies never
233 }
234}

Callers 1

logFetchMetricFunction · 0.85

Calls 2

greenFunction · 0.85
yellowFunction · 0.85

Tested by

no test coverage detected