vercel/vercel-plugin/runtime-cache
Claude Code and agent skill by vercel/vercel-plugin
- vendor
Checking that the SKILL.md file is still in the repository.
Vercel Runtime Cache API guidance — ephemeral per-region key-value cache with tag-based invalidation. Shared across Functions, Routing Middleware, and Builds. Use when implementing caching strategies beyond framework-level caching.
Install
npx vskill@latest install vercel/vercel-plugin/runtime-cacheSKILL.md
Vercel Runtime Cache API
You are an expert in the Vercel Runtime Cache — an ephemeral caching layer for serverless compute.
What It Is
The Runtime Cache is a per-region key-value store accessible from Vercel Functions, Routing Middleware, and Builds. It supports tag-based invalidation for granular cache control.
- Regional: Each Vercel region has its own isolated cache
- Isolated: Scoped per deployment environment (
previewvsproduction); scoped per project on Pro/Enterprise, but shared across all projects on a Hobby team - Persistent across deployments: Cached data survives new deploys (except Next.js 16
use cache: remoteentries, keyed per build); invalidation via TTL orexpireTag - Ephemeral: Fixed storage limit per project; LRU eviction when full
- Framework-agnostic: Works with any framework via
@vercel/functions
Key APIs
All APIs from @vercel/functions:
Basic Cache Operations
Cache Options
Full Example (Framework-Agnostic)
Tag Expiration from Server Action
CDN Cache Purging Functions
These purge across all three cache layers (CDN + Runtime Cache + Data Cache):
Important distinction:
cache.expireTag()— operates on Runtime Cache onlyinvalidateByTag()/dangerouslyDeleteByTag()— purges CDN + Runtime + Data caches
Next.js Integration
Next.js 16+ (use cache: remote)
'use cache'(no: remote) — in-memory only, ephemeral per instance'use cache: remote'— stores in Vercel Runtime Cache
Next.js 16 Invalidation APIs
| Function | Context | Behavior | |
|---|---|---|---|
updateTag(tag) | Server Actions only | Immediate expiration, read-your-own-writes | |
revalidateTag(tag, 'max') | Server Actions + Route Handlers | Stale-while-revalidate (recommended) | |
revalidateTag(tag, { expire: 0 }) | Route Handlers (webhooks) | Immediate expiration from external triggers |
Important: Single-argument revalidateTag(tag) is deprecated in Next.js 16. Always pass a cacheLife profile as the second argument.
Runtime Cache vs ISR Isolation
- Runtime Cache tags do NOT apply to ISR pages
cache.expireTagdoes NOT invalidate ISR cache- Next.js
revalidatePath/revalidateTagdoes NOT invalidate Runtime Cache - To manage both, use same tag and purge via
invalidateByTag(hits all cache layers)
CLI Cache Commands
Note: --tag and --srcimg cannot be used together.
CDN Cache Tags
Add tags to CDN cached responses for later invalidation:
Limits
| Property | Limit | |
|---|---|---|
| Item size | 2 MB | |
| Tags per Runtime Cache item | 128 | |
| Tags per CDN item | 128 | |
| Max tag length | 256 bytes | |
| Tags per bulk REST API call | 16 |
Tags are case-sensitive and cannot contain commas.
Observability
Monitor hit rates, invalidation patterns, and storage usage in the Vercel Dashboard under Observability → Runtime Cache. The CDN dashboard (March 5, 2026) provides a unified view of global traffic distribution, cache performance metrics, a redesigned purging interface, and project-level routing — update response headers or rewrite to external APIs without triggering a new deployment. Project-level routes are available on all plans and take effect instantly.
When to Use
- Caching API responses or computed data across functions in a region
- Tag-based invalidation when content changes (CMS webhook → expire tag)
- Reducing database load for frequently accessed data
- Cross-function data sharing within a region
When NOT to Use
- Framework-level page caching → use Next.js Cache Components (
'use cache') - Persistent storage → use a database (Neon, Upstash)
- CDN-level full response caching → use
Cache-Control/Vercel-CDN-Cache-Controlheaders - Cross-region shared state → use a database
- User-specific data that differs per request
References
- 📖 docs: https://vercel.com/docs/runtime-cache
- 📖 changelog: https://vercel.com/changelog/introducing-the-runtime-cache-api
- 📖 CLI cache: https://vercel.com/docs/cli/cache
- 📖 CDN cache purging: https://vercel.com/docs/caching/cdn-cache/purge
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 17 Mar 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/runtime-cache/SKILL.md
Popularity
- Repository stars
- 9
- Repository forks
- 1
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/vercel/vercel-plugin/runtime-cache)