{"record":{"id":"0afdf499e1b66a14","repo":"vercel/next.js","slug":"pass-infinity-instead-of-false-if-you-do-not-w","errorCode":null,"errorMessage":"Pass `Infinity` instead of `false` if you do not want to revalidate by time.","messagePattern":"Pass `Infinity` instead of `false` if you do not want to revalidate by time\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/server/use-cache/cache-life-profile.ts","lineNumber":35,"sourceCode":"  | { kind: 'config'; profileName: string }\n\nfunction normalizeCacheLifeValue(\n  key: keyof CacheLife,\n  value: unknown,\n  context: CacheLifeProfileContext\n): number | undefined {\n  if (value === undefined) {\n    return undefined\n  }\n\n  if (value === false) {\n    if (key === 'stale') {\n      throw new Error(\n        'Pass `Infinity` instead of `false` if you want to cache on the client forever ' +\n          'without checking with the server.'\n      )\n    } else if (key === 'revalidate') {\n      throw new Error(\n        'Pass `Infinity` instead of `false` if you do not want to revalidate by time.'\n      )\n    } else {\n      throw new Error(\n        'Pass `Infinity` instead of `false` if you want to cache on the server forever ' +\n          'without checking with the origin.'\n      )\n    }\n  }\n\n  if (typeof value !== 'number') {\n    throw new Error(`The ${key} option must be a number of seconds.`)\n  }\n\n  if (value === Infinity) {\n    // Infinity means \"never\", but turns into null when serialized as JSON\n    // (e.g. for build workers or cache handlers), unlike INFINITE_CACHE.\n    return INFINITE_CACHE","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/server/use-cache/cache-life-profile.ts#L17-L53","documentation":"Value normalization in normalizeCacheLifeValue: the revalidate key of a cacheLife profile (inline or from config) was set to false. Time-based revalidation durations cannot be false; use Infinity to disable time-based revalidation, which the error message states directly.","triggerScenarios":"A cacheLife revalidate value of false is configured.","commonSituations":"Use Infinity instead of false to disable time-based revalidation in cacheLife.","solutions":["Use Infinity instead of false for the cacheLife revalidate value."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}