Cache hit ratio = cache hits / (cache hits + cache misses)
A % hit ratio means % of requests are served from cache. The other % hit the database.
Target hit ratios:
- -%: Good
- %+: Excellent
- Below %: Investigate
Improving hit ratio:
- Increase cache size (fit more data)
- Increase TTL (data stays longer)
- Cache more aggressively (cache computed results)
- Warm the cache (preload hot data)
Monitor hit ratio in production. A sudden drop indicates a problem (cache failure, traffic pattern change, data growth).