Problem
stx has SSR, SSG, and createISRHandler, but applications lack a unified route-pattern configuration connecting these capabilities across build and production serving.
An application should be able to prerender landing pages, cache public blog pages with background revalidation, and keep account pages dynamic through one documented configuration.
Existing foundation
Reviewed at 7d93c4c: ssg.ts, production-server.ts, and config types.
This is integration work around existing rendering/cache machinery, not a claim that ISR is missing.
Scope and acceptance criteria
- Introduce typed per-route rules with documented pattern matching and precedence.
- Initially cover prerendering, dynamic rendering, cache lifetime, and background revalidation.
- Connect the rules to both build output and the production request handler.
- Ensure full-page and SPA-fragment responses follow consistent policies without mixing their cache entries.
- Keep personalized responses out of shared caches by default.
- Verify precedence, cache hits, expiration, revalidation failures, and explicit invalidation.
- Document supported combinations and reject unsupported settings clearly.
CDN-specific ISR and additional deployment platforms can remain follow-ups.
Prior art: Nuxt rendering modes and route rules.