cdn-caching

Diagnose Vercel CDN and ISR cache behavior using metrics, logs, and response headers.

Updated Jul 31, 2026
One-click install
npx skills add https://github.com/AarnavBaddam/skills --skill cdn-caching-aarnavbaddam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cdn-caching
Source: https://github.com/AarnavBaddam/skills/tree/main/cdn-caching
Command: npx skills add https://github.com/AarnavBaddam/skills --skill cdn-caching-aarnavbaddam

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) with opaque outcomes. This Skill turns raw cache signals into a concrete diagnosis of hit rate, revalidation cost, and bypass causes. ## Core Features & Use Cases - Cache hit rate analysis: Measure cacheable traffic with vercel metrics grouped by cache_result, then drill into MISS buckets by path type and route. - ISR cost investigation: Quantify read/write units, compute write utilization, and find hot cache tags with large blast radius driving revalidation spend. - Per-request debugging: Interpret x-vercel-cache status and the nine cacheReason values (cold, collapsed, draft_mode, stale_tag, etc.) via curl and vercel logs. - 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 switch to granular blogPost:<id> tags. ## Quick Start Ask the agent to analyze why your 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` 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 ISR cost so high?

High ISR cost usually comes from write units driven by frequent revalidation, not traffic volume. Group `vercel.isr_operation.write_units` by route and cache_tags to find broad tags with a large blast radius, then prefer granular tags and on-demand invalidation over short time-based intervals.

What does x-vercel-cache BYPASS mean?

BYPASS means caching was skipped for that request, commonly due to Draft Mode, prerender-bypass cookies, SEO crawler user agents, or headers like no-store and private. The cacheReason values draft_mode, prerender_bypass, and crawler explain which cause applies.

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

Invalidate (invalidateByTag, revalidateTag) uses stale-while-revalidate, serving stale content while regenerating in the background. Dangerously-delete (dangerouslyDeleteByTag, updateTag) hard-removes entries, so the next request blocks in the foreground and shows REVALIDATED.

Does PPR avoid function invocations on Vercel?

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

Why does a Vercel page show MISS on every request?

A path that should cache but shows MISS usually has Cache-Control set to private, no-store, or max-age=0, uses per-request inputs like cookies or searchParams, or responds to an uncacheable method. Inspect headers with curl and check x-matched-path for rewrite variants.