What problem does it solve?
Caching addresses slow reads, excessive database load, and high token/IO cost by storing frequently accessed data closer to the application and avoiding repeated expensive queries or recomputations.
Core Features & Use Cases
- HybridCache default: L1 in-memory + L2 distributed caching with built-in stampede protection for safe, efficient reads.
- Output caching: Cache full HTTP responses for public or static endpoints and evict by tag on mutations.
- Cache invalidation & patterns: Clear entries on writes, use user-scoped keys for private data, and prefer explicit TTLs to avoid stale data.
- Use Case: Speed up product listing endpoints with HybridCache GetOrCreateAsync and evict product tags on updates to maintain consistency.
Quick Start
Use the caching skill to add HybridCache with sensible TTLs and Redis L2, then wrap read handlers with GetOrCreateAsync and evict related keys or tags on writes.