Cache Key Design & Request Coalescing
Learn how to design effective cache keys across layers and how request coalescing prevents thundering-herd load on your origin.
What Is a Cache Key?
A cache key uniquely identifies a cached entry. When a request arrives, the cache computes its key and looks for a matching stored response.
- Same key equals a cache hit
- Different key equals a separate entry (or a miss)
- Poor key design causes low hit ratios or wrong responses
Default Cache Keys
By default many caches key on the full URL including host and path. But query strings, headers, and cookies can also be part of the key, which dramatically affects how often you get hits.
All lessons in this course
- Combining Redis and CDN
- Multi-Layer Caching Strategy
- Data Consistency Across Caches
- Cache Key Design & Request Coalescing