cdn-caching

Diagnose Vercel CDN cache hit rates, stale content, revalidation behavior, and ISR costs.

5.3k|765|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/openai/plugins --skill cdn-caching
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cdn-caching
Source: https://github.com/openai/plugins/tree/main/plugins/vercel/skills/cdn-caching
Command: npx skills add https://github.com/openai/plugins --skill cdn-caching

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Debugging why Vercel-served pages are stale, uncached, or expensive is hard because caching spans multiple layers (CDN, ISR, PPR, function invocations) with opaque per-request behavior. This Skill provides expert guidance and concrete CLI workflows to measure cache hit rates, explain per-request cache outcomes, and control ISR revalidation costs.

Core Features & Use Cases

  • Cache hit rate analysis: Measure cache-served versus origin traffic with vercel metrics, excluding BYPASS noise, and drill into which routes and paths miss most.
  • Per-request cache reasoning: Interpret x-vercel-cache statuses and the nine cacheReason values (cold, collapsed, draft_mode, stale_tag, etc.) to explain exactly why a request missed or went stale.
  • ISR cost control: Quantify read/write units, compute write utilization, detect broad cache-tag blast radius, and shift from time-based to on-demand tag revalidation.
  • Use Case: Your ISR bill spiked after a CMS webhook change. Use this Skill to group write units by cache_tags, discover a broad blogPost tag invalidating thousands of pages, and replace it with granular blogPost:<id> invalidation.

Quick Start

Ask the agent to analyze why my Vercel site's cache hit rate dropped and which routes are driving ISR write costs.

Frequently Asked Questions about cdn-caching

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

FAQPage Schema
How do I check my Vercel cache hit rate?

Run `vercel metrics vercel.request.count` grouped by `cache_result` for your team and project, filtered to production. Treat HIT, STALE, and PRERENDER as cache-served and exclude BYPASS and unset values so non-cacheable traffic does not distort the ratio.

Why is my Vercel page serving stale content?

Stale responses come from stale-while-revalidate behavior after time-based intervals or tag invalidation. Check the `cacheReason` field: `stale_time` means a scheduled refresh, `stale_tag` means an invalidation call, and `stale_error` means regeneration failed and the last-good copy is served.

What is the difference between invalidate and dangerously-delete on Vercel?

Invalidate (revalidateTag, invalidateByTag) uses stale-while-revalidate, serving the old copy while regenerating in the background. Dangerously-delete (updateTag, dangerouslyDeleteByTag) hard-removes the entry, so the next request blocks in the foreground to regenerate.

Does PPR avoid function invocations on Vercel?

No. A PPR route has dynamic holes by definition, so even a cached shell hit still invokes the function to render the dynamic parts. Only a route with no holes serves as a pure prerender HIT without a function call.

How do I reduce Vercel ISR costs?

Focus on write_units, which bill per 8 KB on every revalidation. Prefer on-demand tag-based revalidation over short time-based intervals, scope tags to specific IDs like `product-<id>` instead of broad tags, and lengthen revalidate intervals where regeneration outpaces reads.

Why does my Vercel traffic show BYPASS in cache metrics?

The largest legitimate BYPASS sources are Draft Mode, prerender-bypass cookies, and SEO crawlers, all of which intentionally skip caching. Group BYPASS requests by bot_category, user_agent, and request_method to confirm what remains before tuning headers.