runtime-cache

Implements Vercel Runtime Cache key-value operations with tag-based invalidation across serverless functions.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/sharad07072007/paras --skill runtime-cache-sharad07072007
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: runtime-cache
Source: https://github.com/sharad07072007/paras/tree/main/.agents/plugins/vercel/skills/runtime-cache
Command: npx skills add https://github.com/sharad07072007/paras --skill runtime-cache-sharad07072007

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @vercel/functions.

What problem does it solve? Caching data across Vercel serverless functions, routing middleware, and builds requires understanding a regional, ephemeral cache layer with its own APIs, invalidation semantics, and isolation rules that differ from framework-level caching and ISR. ## Core Features & Use Cases - Runtime Cache Operations: Guides usage of getCache() from @vercel/functions for set, get, delete, and tag-based expiration with TTL and namespacing. - Multi-Layer Invalidation: Explains invalidateByTag and dangerouslyDeleteByTag for purging CDN, Runtime, and Data caches together, plus CLI cache commands. - Next.js Integration: Covers 'use cache: remote' in Next.js 16, updateTag/revalidateTag semantics, and the isolation boundary between Runtime Cache and ISR. - Use Case: A CMS webhook triggers a server action that calls expireTag('blog') so all functions in the region serve fresh content within 300ms. ## Quick Start Ask the AI to add Vercel Runtime Cache caching with tag-based invalidation to an API route using @vercel/functions.

Frequently Asked Questions about runtime-cache

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

FAQPage Schema
How do I use the Vercel Runtime Cache API in a serverless function?

Import getCache from @vercel/functions, then call cache.set with a key, value, TTL, and tags, and cache.get to retrieve values. The cache is regional, scoped per project and deployment environment, and shared across functions, middleware, and builds.

What is the difference between expireTag and invalidateByTag in Vercel caching?

cache.expireTag operates only on the Runtime Cache, while invalidateByTag purges all three layers: CDN, Runtime Cache, and Data Cache. dangerouslyDeleteByTag performs a hard delete that blocks the next request until revalidation completes.

Does Vercel Runtime Cache work with Next.js ISR pages?

No, Runtime Cache tags do not apply to ISR pages, and cache.expireTag does not invalidate ISR cache. To manage both, use the same tag and purge via invalidateByTag, which hits all cache layers.

Can I use Redis or ioredis directly in Vercel serverless functions?

Direct Redis or ioredis clients rely on persistent TCP connections that do not fit serverless execution. Use @upstash/redis for HTTP-based, serverless-native Redis access instead.

What are the limits of Vercel Runtime Cache tags and item sizes?

Items are limited to 2 MB, with up to 64 tags per Runtime Cache item and 128 per CDN item. Tags are case-sensitive, cannot contain commas, and have a maximum length of 256 bytes.

When should I not use the Vercel Runtime Cache?

Avoid it for framework-level page caching, persistent storage, CDN-level full response caching, cross-region shared state, or user-specific per-request data. Use Next.js cache components, a database, or Cache-Control headers for those cases.