
Cache Hit Ratio
How it’s calculated
MISS becomes a HIT after the first request fills the cache. A path that’s only ever requested once is always a MISS and drags CHR down — that’s normal for long-tail content.
What “good” looks like
Don’t chase a single number — chase trend stability per path class.
Read the chart
Pull via API
Diagnose a low CHR
Tuning playbook
- Spot the bad prefix. Filter analytics by URL prefix; find the prefix dragging overall CHR down.
- Inspect a sample path.
curl -sSI "$CDN_HOST/the/path"and look atcache-control,vary, and the cache rule that matches. - Apply the right fix:
- Origin sends
private/no-store→ enable Ignore Origin No Cache on the cache rule. - Query string is noisy → enable Ignore Query String in Cache Key.
Vary: User-Agentfragments cache → strip or narrow via response header rule.- TTL too short → bump expiration time.
- Origin sends
- Validate. Wait for the cache to rewarm, then check CHR per path.
Common false alarms
- CHR drops right after a purge. Expected — every purged path becomes a MISS until refilled. Watch for recovery within minutes.
- CHR drops on launch day. New paths haven’t filled the cache yet. Don’t tune; wait.
- Low CHR on auth callbacks / per-user JSON. These are correctly uncacheable. Exclude them from your “should be cached” baseline.
Operational tips
- Track per-path-class CHR, not a single distribution-wide number — averages hide problems.
- Alert on slope, not value. A 10-point drop in 5 minutes is incident-worthy; a slowly drifting baseline calls for tuning, not paging.
- Pair with origin metrics. Origin CPU spikes that line up with CHR drops confirm causation.
- Cache hit ratio + bandwidth answers “is this CDN paying off?” — the higher CHR, the more leverage.