caching

Implement a 4-layer caching strategy across React, Next.js, Redis, and Cloudinary.

2|Updated Aug 20, 2025
One-click install
npx skills add https://github.com/JasonPaff/head-shakers --skill caching
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: caching
Source: https://github.com/JasonPaff/head-shakers/tree/main/.claude/skills/caching
Command: npx skills add https://github.com/JasonPaff/head-shakers --skill caching

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces a consistent 4-layer caching strategy, eliminating redundant data fetches and ensuring optimal application performance across React, Next.js, Redis, and Cloudinary, while simplifying cache invalidation.

Core Features & Use Cases

  • Multi-Layered Caching: Guides the use of React cache(), Next.js unstable_cache(), Upstash Redis, and Cloudinary for appropriate caching scenarios.
  • Standardized Cache Keys & Tags: Enforces the use of CACHE_KEYS, REDIS_KEYS, and CacheTagGenerators for consistent and effective cache management.
  • Coordinated Cache Invalidation: Ensures mutations trigger precise cache invalidation using CacheRevalidationService to maintain data freshness.
  • Use Case: When implementing a public search endpoint, this Skill guides the use of CacheService.redisSearch.publicDropdown() for high-traffic queries, ensuring appropriate REDIS_TTL and createHashFromObject() for key generation, and CacheService.search.invalidatePublic() for invalidation.

Quick Start

Implement caching for a public API endpoint that fetches a list of 'Featured Products', using CacheService.featured.content() and ensuring proper cache invalidation upon product updates.