Request-context cache demo

vinext supports route-level caching through whatever cache the runtime exposes on ctx.cache. ISR responses carry Cache-Control and Cache-Tag headers, and revalidateTag() / revalidatePath() automatically fan out to ctx.cache.purge(...) alongside the inner CacheHandler. Deployed here on Cloudflare Workers (which provides a compatible ctx.cache when cache.enabled: true), but no Cloudflare-specific import is required.

Probe /cached/intro

Issues a no-store fetch against the route. The route embeds a fresh render-id into every server-rendered response — comparing it across probes is the most reliable way to tell whether SSR actually happened or a cache served the same bytes again. cf-cache-status is shown alongside as the outer Workers Cache verdict.

HTTP status
render-id
render-time
cf-cache-status
not set — running locally, or the runtime doesn't expose it
Age
Cache-Control
CDN-Cache-Control
Cache-Tag
cf-ray
Probed at

Pick a demo route

ISR Static page

Renders a server timestamp under revalidate = 60. Every reload after the first should hit the cache layer.

Open /cached/intro →

Tags Tagged content

A tagged fetch() during render attaches post:<slug> to the page's cache entry. Try revalidateTag("post:featured") from the panel.

Open /cached/featured →

Route Cached route handler

/api/now caches a JSON payload for 30s. Watch the timestamp freeze, then refresh after the revalidate window.

Open /api/now →

Dynamic Always-fresh

force-dynamic for comparison. The Worker runs on every request and the outer cache is bypassed.

Open /dynamic →