Caching Strategies

Installation
SKILL.md

Caching Strategies with Redis

Patterns

  • Cache-Aside: Application checks cache first, if miss, loads from DB and updates cache.
  • Write-Through: Application writes data to both cache and DB simultaneously.

Invalidation

Ensure stale data is removed via TTLs or explicit deletion on updates.

Diagram

%%{init: {"theme": "default", "flowchart": {"useMaxWidth": true}}}%%
flowchart TD
    A[App] -->|1. Read| B{Cache}
    B -- Hit --> A
    B -- Miss --> C[(Database)]
    C -->|2. Return Data| A
    A -->|3. Update Cache| B
Installs
–
GitHub Stars
34
First Seen
–