query-caching-strategies

Community

Speed up reads with multi-level query caching.

Authorcenjie
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Reduce database load and improve API response times by caching expensive or frequently-run queries so read-heavy systems serve results from fast in-memory stores instead of hitting the database on every request.

Core Features & Use Cases

  • Multi-level caching patterns using Redis, Memcached, and database-side techniques such as materialized views.
  • Invalidation strategies including event-based invalidation via triggers or application hooks, and time-based invalidation using TTLs and eviction policies.
  • Cache warming, LRU/LFU eviction configuration, and practical examples for user lookups, product catalogs, and analytics queries.
  • Use case: Serve user profile and product detail pages from Redis with a one-hour TTL, invalidate related keys on updates, and periodically warm hot keys on startup.

Quick Start

Cache database query results in Redis with a one-hour TTL and invalidate related keys when the underlying records change.

Dependency Matrix

Required Modules

None required

Components

scriptsreferences

💻 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: query-caching-strategies
Download link: https://github.com/cenjie/skills/archive/main.zip#query-caching-strategies

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

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.