Caching at Scale in Django: Lessons from Production
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
Johnny Metz describes how his team's multi-tenant Django API handled roughly 20x traffic growth through aggressive Redis caching. The main design caches permission-filtered document IDs per user and one shared base per document, so a write clears one key. Other practices: seven-day TTLs with signal-driven invalidation, fail-open Redis settings, and tests for invalidation. He reports halved database queries per second and a 97% hit rate. These figures are self-reported and unsourced.