runtime-cache

Cache key-value data per region with tag-based invalidation via the Vercel Runtime Cache API.

246|42|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/vercel-labs/vercel-plugin --skill runtime-cache
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: runtime-cache
Source: https://github.com/vercel-labs/vercel-plugin/tree/main/skills/runtime-cache
Command: npx skills add https://github.com/vercel-labs/vercel-plugin --skill runtime-cache

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the need for efficient, serverless-native caching within the Vercel ecosystem, enabling faster data retrieval and reduced load on origin servers by providing a per-region, key-value cache with tag-based invalidation.

Core Features & Use Cases

  • Per-Region Caching: Stores data isolated to specific Vercel regions, improving latency for regional users.
  • Tag-Based Invalidation: Allows for granular cache purging using tags, ensuring data freshness without full cache resets.
  • Framework Agnostic: Integrates with Vercel Functions, Routing Middleware, and Builds, usable across different frameworks.
  • Use Case: Cache frequently accessed API responses or computed data in a serverless function, and then invalidate that cache using a tag whenever the underlying data is updated via a CMS webhook.

Quick Start

Use the runtime-cache skill to set a key named 'user:123' with user data, a TTL of 3600 seconds, and tags 'users' and 'user:123'.

Frequently Asked Questions about runtime-cache

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

FAQPage Schema
How does Vercel runtime cache work for serverless functions?

Vercel runtime cache provides a per-region, key-value store for serverless functions, routing middleware, and builds. It improves data retrieval latency and reduces origin server load by storing data isolated to specific Vercel regions.

How do I invalidate cached API responses when underlying data changes?

You can invalidate cached API responses using tag-based invalidation. By assigning tags to your cached data, you can granularly purge specific cache entries when the underlying data updates, such as via a CMS webhook, without resetting the entire cache.

Does the Vercel Runtime Cache API integrate with Next.js caching mechanisms?

Yes, the Vercel Runtime Cache API integrates directly with Next.js caching mechanisms. It also supports Vercel Functions, Routing Middleware, and Builds to optimize data retrieval across different frameworks.

What's the best way to cache data per-region on Vercel?

The best way to cache data per-region on Vercel is using the Runtime Cache API. It allows you to set key-value pairs with specific TTLs and tags, ensuring faster data retrieval for regional users while reducing load on origin servers.

Can I use Vercel Runtime Cache across different serverless frameworks?

Yes, the Vercel Runtime Cache is framework agnostic. It integrates with Vercel Functions, Routing Middleware, and Builds, allowing you to implement per-region key-value caching and tag-based invalidation across various frameworks.

Are there CLI commands available for managing Vercel serverless cache?

Yes, the Vercel Runtime Cache API offers CLI commands for cache management. These commands allow you to manage your per-region key-value cache and execute tag-based invalidation directly from your terminal or build scripts.