runtime-cache

Manage ephemeral key-value storage with tag-based invalidation in Vercel serverless environments.

2|Updated Mar 29, 2026
One-click install
npx skills add https://github.com/NagyVikt/codex-plugins --skill runtime-cache-nagyvikt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: runtime-cache
Source: https://github.com/NagyVikt/codex-plugins/tree/main/plugins/vercel/skills/runtime-cache
Command: npx skills add https://github.com/NagyVikt/codex-plugins --skill runtime-cache-nagyvikt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @vercel/functions, and includes references (resource) components.

What problem does it solve?

This Skill addresses the need for a low-latency, regional key-value store that persists across serverless function invocations and deployments, preventing redundant computations and database hits.

Core Features & Use Cases

  • Tag-based Invalidation: Efficiently purge related cache entries using granular tags.
  • Regional Persistence: Maintain ephemeral state across Vercel Functions, Middleware, and Builds within specific regions.
  • Use Case: Use this to cache expensive API responses or computed data objects that need to be shared across multiple serverless functions while ensuring they can be invalidated instantly when the underlying data changes.

Quick Start

Use the runtime-cache skill to implement a cached fetch request for the blog-posts endpoint with a one-hour time-to-live and a blog tag.

Frequently Asked Questions about runtime-cache

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

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

You can cache API responses across Vercel serverless functions by using ephemeral key-value storage to persist computed data regionally. This prevents redundant computations and database hits during function invocations.

What is tag-based cache invalidation in serverless environments?

Tag-based cache invalidation is a method to efficiently purge related cache entries using granular tags within Vercel serverless environments. It facilitates performance optimization while ensuring data consistency when underlying data changes.

How do I set up a cached fetch request with a time-to-live on Vercel?

Set up a cached fetch request on Vercel by configuring a key-value store entry with a specific time-to-live and associated tag. This caches expensive API responses like blog-posts endpoints for designated durations such as one hour.

Can I share ephemeral state across Vercel Functions, Middleware, and Builds?

Yes, you can maintain ephemeral state regionally across Vercel Functions, Middleware, and Builds. This regional persistence ensures low-latency data sharing across multiple serverless functions within specific regions.

Does the @vercel/functions SDK support granular cache control?

Yes, the @vercel/functions SDK supports granular cache control for managing ephemeral key-value storage. It implements tag-based invalidation to ensure data consistency and reduce origin load across serverless environments.

What is the best way to reduce origin load for expensive computed data in serverless applications?

The best way to reduce origin load for expensive computed data is implementing ephemeral caching with tag-based invalidation. This approach caches computed data objects across serverless functions while allowing instant invalidation when underlying data changes.