Building Your App
Caching & Revalidating
Incremental Static Regeneration with stale-while-revalidate semantics.
Export revalidate from a page to control how long its rendered HTML is cached by the Rust layer.
tsx
// cache for 60s, then revalidate in the background
export const revalidate = 60;
// cache indefinitely
export const revalidate = false;
// never cache (default)
// (omit the export)How it works
Cached pages are served from memory in microseconds. When a page is stale, GioJS serves the stale copy immediately and revalidates in the background — visitors never wait.
Cache keys are deployment-ID aware, so a redeploy automatically invalidates stale entries.