- Cache Penetration: Bots querying non-existent IDs bypass cache and hit DB repeatedly—fix by caching a short-TTL empty/null placeholder (
"NULL", 60s). - Cache Avalanche: Thousands of keys expiring at the exact same second—fix by adding random jitter to TTLs (e.g.,
3600 + rand(0, 300)).
ADVERTISEMENT