runtime-cache

Cache key-value data per region with tag-based invalidation via @vercel/functions.

Updated May 16, 2026
One-click install
npx skills add https://github.com/MohammedHTahir/vibe-coding-platform --skill runtime-cache-mohammedhtahir
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: runtime-cache
Source: https://github.com/MohammedHTahir/vibe-coding-platform/tree/main/.kiro/vercel-plugin/skills/runtime-cache
Command: npx skills add https://github.com/MohammedHTahir/vibe-coding-platform --skill runtime-cache-mohammedhtahir

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves slow repeated reads and unnecessary recomputation in serverless workloads by providing an ephemeral, per-region cache with tag-based invalidation so you can keep data fresh without losing performance.

Core Features & Use Cases

  • Per-region key-value caching: Store and retrieve values across Functions, Routing Middleware, and Builds using Vercel Runtime Cache.
  • Tag-based invalidation: Expire groups of cache entries quickly with expireTag for granular control rather than blanket purges.
  • Multi-layer cache control: Choose between Runtime Cache-only invalidation and broader CDN + Data cache purging using CLI/cache purge and tag-based purge functions.
  • Framework integration: Use Next.js 16 Cache Components with 'use cache: remote' and align tag strategies across Next.js and Vercel cache layers.

Quick Start

Ask your AI to cache an expensive API response in Vercel Runtime Cache for 3600 seconds under a key like blog-posts, and tag it with blog so you can invalidate it later with expireTag.

Frequently Asked Questions about runtime-cache

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

FAQPage Schema
How do I cache expensive API responses in Vercel serverless functions?

You can cache expensive API responses in Vercel serverless functions by storing computed or remote API results as ephemeral per-region key-value pairs using Runtime Cache, keeping data fresh without unnecessary recomputation.

What is tag-based invalidation in serverless runtime cache?

Tag-based invalidation in serverless runtime cache allows you to expire groups of related cache entries granularly using the expireTag function, avoiding blanket purges while keeping cached data fresh across Functions, Routing Middleware, and Builds.

How do I selectively purge cache entries in Next.js middleware?

You can selectively purge cache entries in Next.js middleware by applying tag-based invalidation via the expireTag function, coordinating selective refresh of cached remote API results without executing broader CDN or Data cache purges.

Does Vercel Runtime Cache work with Next.js 16 Cache Components?

Yes, Vercel Runtime Cache works with Next.js 16 Cache Components by aligning 'use cache: remote' tag strategies across Next.js and Vercel cache layers for consistent per-region key-value caching and invalidation behavior.

When should I use Runtime Cache expiration instead of a full CDN purge?

Use Runtime Cache tag-based expiration when you need granular control to refresh specific cached serverless compute results, and choose broader CDN or Data cache purging only when blanket cache clearing is required.

Can I use edge middleware to store and retrieve cached values across builds?

Yes, you can use edge middleware to store and retrieve ephemeral cached values across Functions, Routing Middleware, and Builds using Vercel Runtime Cache getCache operations like set, get, and delete.