vercel-labs avatar

Runtime Cache

Ephemeral key-value caching layer that lives in Vercel's edge regions, separate from your framework's cache but accessible from Functions, Middleware, and Builds. The tag-based invalidation is the real win here: you can expire entire groups of cache entries at once without tracking individual keys. It's regional and per-deployment isolated, so production and preview environments don't step on each other. Works framework-agnostic via @vercel/functions, though Next.js 16+ gets special treatment with the `use cache: remote` directive. Watch the distinction between expireTag (Runtime Cache only) and invalidateByTag (nukes CDN plus Runtime plus Data caches). Good for API response caching beyond what your framework handles natively.

skills.sh installs
228
GitHub stars
183
last updated
Jun 3, 2026

Install

$ npx -y skills add vercel-labs/vercel-plugin --skill runtime-cache --agent claude-code

Installs 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 (preview vs production); 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: remote entries, keyed per build); invalidation via TTL or expireTag
  • 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-labs/vercel-plugin
Category
Cloud & Infrastructure
First seen
Jun 3, 2026

More from vercel-labs/vercel-plugin

All 32
1vercel-labs avatarverificationvercel-labs/vercel-pluginverification226skills.sh installs
2vercel-labs avatarcsvvercel-labs/bash-toolAnalyze and transform CSV data using bash tools224skills.sh installs
3vercel-labs avatarweb-design-guidelinesvercel-labs/claude-skillsweb design guidelines223skills.sh installs
4vercel-labs avatarnext-cache-componentsvercel-labs/vercel-pluginnext cache components218skills.sh installs
5vercel-labs avatarjson-render-shadcnvercel-labs/json-renderPre-built shadcn/ui components for json-render. Use when working with @json-render/shadcn, adding standard UI components to a catalog, or building web UIs with 213skills.sh installs
6vercel-labs avatarnext-upgradevercel-labs/vercel-pluginnext upgrade213skills.sh installs