PERF006infoPro

uncached-public-page

Next.js page does database queries but does not export revalidate, dynamic, or generateStaticParams — every request triggers a fresh SSR.

Applies to: TypeScript

Why this matters

Server-rendered pages that query the database on every request are slow and put unnecessary load on the database. If the data doesn't change every second, adding `export const revalidate = 60` enables Incremental Static Regeneration (ISR): Next.js caches the rendered page and only re-renders in the background after the cache expires. This can cut TTFB from ~500ms to ~5ms for cached hits.

Catch it before it ships

pip install stablestack # or: npx stablestackstablestack # scans your project, PERF006 includedstablestack explain PERF006

PERF006 is part of the Pro rule set. See pricing — the free tier ships 24 checks with no signup.

False positive in your codebase? Suppress a single line with # noqa: PERF006