caching

Community

Optimize data access, boost application speed.

AuthorJasonPaff
Version1.0.0
Installs0

System Documentation

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.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: caching
Download link: https://github.com/JasonPaff/head-shakers/archive/main.zip#caching

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository