What problem does it solve?
It helps you reduce latency and database load by caching read operations while preventing stale data, stampedes, and inefficient caching behavior.
Core Features & Use Cases
- HybridCache-based read caching: Uses .NET’s HybridCache to combine local and distributed caching with built-in stampede protection.
- Cache invalidation on mutations: Removes or evicts cached entries when data changes to keep results consistent.
- Output caching for whole HTTP responses: Caches full endpoint responses when the entire payload can be safely reused (often for public/static-like data).
Use case: When building a products API, cache GET /products/{id} lookups with HybridCache for fast reads, evict the specific key after PUT /products/{id} updates, and optionally cache GET / or list endpoints at the response level using output caching.
Quick Start
Load this caching skill and implement HybridCache GetOrCreateAsync for your read endpoints, then add targeted invalidation or tag eviction on your write endpoints.