Cache Strategy
CommunityOptimize data access with smart caching.
AuthorCleanExpo
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill addresses the performance bottlenecks caused by repeated, expensive data computations or fetches by implementing effective caching strategies across Python and Next.js applications.
Core Features & Use Cases
- In-Memory Caching: Utilizes Python's
@lru_cacheand customTTLCachefor efficient data retrieval within a single process. - Redis Integration: Implements cache-aside patterns using Redis for shared, network-accessible caching.
- Next.js Fetch Caching: Configures
fetchdirectives (cache,revalidate) for optimal data fetching in Server Components. - Embedding Caching: Specifically caches expensive vector embedding computations.
- Use Case: When fetching user profile data that doesn't change frequently, cache it in Redis with a 5-minute TTL to reduce database load and improve response times for subsequent requests.
Quick Start
Apply the TTLCache pattern with a max size of 256 and a TTL of 300 seconds to cache API responses.
Dependency Matrix
Required Modules
None requiredComponents
referencesscripts
💻 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: Cache Strategy Download link: https://github.com/CleanExpo/DR-NRPG/archive/main.zip#cache-strategy Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.