
Runtime Cache
This is Vercel's ephemeral key-value cache that lives at the edge, shared across functions, middleware, and builds. It's what you reach for when Next.js's built-in caching isn't granular enough and you need tag-based invalidation without managing Redis infrastructure. The skill covers the `@vercel/functions` APIs, tag expiration patterns, and the critical distinction between `cache.expireTag()` (runtime only) versus `invalidateByTag()` (purges CDN, runtime, and data layers). One thing to know: it's regionally isolated and scoped per environment, so production and preview caches never mix. Useful validation rule catches direct Redis/ioredis imports and suggests Upstash instead for serverless compatibility.
- skills.sh installs
- 312
- GitHub stars
- 183
- last updated
- Jun 3, 2026
Install
$ npx -y skills add vercel/vercel-plugin --skill runtime-cache --agent claude-codeInstalls into .claude/skills of the current project.
Files
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
import { getCache } from '@vercel/functions';
const cache = getCache();
Sponsors
Details
- Repository
- github.com/vercel/vercel-plugin
- Category
- Cloud & Infrastructure
- First seen
- Jun 3, 2026
More from vercel/vercel-plugin
All 25- Vercel Sandbox308
- Knowledge Update301
- Marketplace300
- Next Forge191
- Nextjs629
- Ai Sdk544
- React Best Practices491
- Deployments Cicd484
- Shadcn458
- Vercel Cli432
- Turbopack429
- Ai Gateway423
- Env Vars422
- Vercel Functions410
- Next Cache Components385
- Next Upgrade368
- Routing Middleware338
- Auth326
- Vercel Storage326
- Vercel Agent317
- Bootstrap315
- Chat Sdk315
- Verification315
- Workflow313