deployment-caching

Select deployment cache boundaries for Rango apps across Cloudflare, Vercel, and Node.

Updated Nov 7, 2025
One-click install
npx skills add https://github.com/rangojs/rango --skill deployment-caching-rangojs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deployment-caching
Source: https://github.com/rangojs/rango/tree/main/packages/rangojs-router/skills/deployment-caching
Command: npx skills add https://github.com/rangojs/rango --skill deployment-caching-rangojs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Choosing the wrong cache boundary in a Rango deployment can silently bypass middleware, leak per-user data through shared caches, or waste origin compute. This Skill clarifies where each caching mechanism executes so you can pick the right one for Cloudflare, Vercel, or Node deployments. ## Core Features & Use Cases - Execution matrix: Compares "use cache", cache(), Prerender(), ppr, document-cache middleware, and HTTP CDN caching by stored artifact, function execution, middleware behavior, and what stays live. - Platform guidance: Explains how the Cloudflare Worker preset, Vercel streaming Function preset, and generic Node preset each handle PPR shells, prerender payloads, and cache stores. - Cache-Control decision rules: Defines when full-response CDN caching with s-maxage is safe, why Vary: Cookie is a trap, and how the Rango document-cache middleware and a platform CDN independently consume the same header. - Use Case: You are deploying a Rango app to Vercel and wonder whether CDN-stitched PPR would help. The Skill explains why the preset keeps PPR in-function to preserve middleware ordering, and when to use full-response s-maxage caching instead. ## Quick Start Ask the AI to help you choose between in-function PPR, document-cache middleware, and CDN s-maxage caching for your Rango app deployed on Vercel.

Frequently Asked Questions about deployment-caching

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose between PPR and CDN caching for a Rango app?

Use in-function PPR when middleware must run per request or the page contains per-user data in live holes. Use CDN caching with s-maxage only when the complete response is identical for all users and no middleware needs to run on every request.

Does Rango PPR run middleware before serving the cached shell?

Yes. Rango PPR is in-function: global and route middleware run before the shell lookup, so redirects, auth decisions, cookies, and response headers win before any shell byte is committed.

Does the Vercel preset use Vercel's CDN or ISR cache for PPR?

No. The Vercel preset serves HTML, Flight payloads, and PPR shells from one streaming Node Function using Runtime Cache. It deliberately emits no prerender-config or CDN chain because CDN-stitched shells cannot preserve Rango's middleware ordering.

When is it safe to use Cache-Control s-maxage on Rango responses?

Only when the complete response is identical for every request, no auth or tenant middleware must run, no loader output contains per-user data, no per-client Set-Cookie exists, and whole-response TTL freshness is acceptable.

Why does updateTag not purge my CDN-cached Rango page?

The Rango document-cache middleware store and the platform CDN are independent caches. Tag-based invalidation only affects the app store; a CDN that cached the response via s-maxage requires the platform's own invalidation mechanism.