playbook/antigravity-awesome-skills/plugins/antigravity-awesome-skills-.../skills/vercel-optimize/references/support-topics/use-cache-date-stamp-isr-wr...

1.2 KiB

id title status candidateKinds frameworks scannerPatterns priority citations maxBriefChars
use-cache-date-stamp-isr-write-amplifier 'use cache' date-stamp ISR write amplifier active
use_cache_date_stamp
next@>=15.0.0
use-cache-date-stamp
88
https://nextjs.org/docs/app/api-reference/directives/use-cache
https://nextjs.org/docs/app/api-reference/functions/cacheLife
900

Investigation Brief

'use cache' keys on argument identity and prerender output. A new Date(), Date.now(), or Math.random() baked into the cached output forces a fresh ISR write on every regeneration even when the data is unchanged.

Evidence To Check

Check the scanner finding's subtype: module-scope (module-level date) or in-cache-fn (inside the cached body). Cross-reference isrWritesByRoute — a stable write rate against low reads is the symptom.

Do Not Recommend When

Skip if the date is inside useEffect/useCallback/useMemo. Skip if 'use cache' is only a comment. Skip if the date is the intended cache key.

Verification

Name the file, the specific primitive call, and the replacement: build-time constant or client-side useEffect.