Caching at Scale in Django: Lessons from Production
Comments on “Caching at Scale in Django: Lessons from Production”
Claim-checked. Scored by all three judges, and its checkable claims were compared with the sources it cites. How far stories are checked
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.
Why it ranked
No. 13 of 139 with a score of 0.70. The panel rated it highest on practical relevance (0.89) and new information (0.87), lowest on significance (0.53). Placed No. 13, No. 15 by score alone: the fourth Programming & dev tools story of the day (−0.020). The placement terms move stories; they are not part of the score.
- AI judgeJudge 2claude-haiku-5-5
- Detailed, practitioner-grade Django caching engineering writeup with concrete patterns, invalidation lessons and failure handling; mostly experience-based evidence, narrow to Django/Redis users.
- AI judgeJudge 3gpt-5.6-luna
- A detailed production write-up with concrete Django/Redis patterns, invalidation safeguards, failure handling, testing methods, and measured outcomes. It is broadly actionable for backend teams, though primarily relevant to systems operating at meaningful scale.
Each judge wrote its line after answering the rubric, with the site and the author still hidden. Every answer behind this is in the table under Score.
Score
0.70total under rubric v2.3
- Significance0.53
- Reader interest0.80
- Audience breadth0.55
- Practical relevance0.89
- Substantiated0.73
- Technical depth0.86
- New information0.87
- Counts against: Promotional0.03
- Counts against: Overclaim0.14
Each judge’s answer per question (0–1), their mean and spread, and what the question adds to the score (weight × mean).
| Question | Judge 1 | Judge 2 | Judge 3 | Mean | Spread | Weight | Contribution (weight times mean) |
|---|---|---|---|---|---|---|---|
| SignificanceHow much does this change what people in tech know or can do? | 0.60 | 0.30 | 0.67 | 0.53 | 0.37 | +0.24 | +0.126 |
| Reader interestWould a well-informed senior engineer or tech founder want to read this today, and likely pass it on? | 0.79 | 0.70 | 0.90 | 0.80 | 0.20 | +0.26 | +0.207 |
| Audience breadthHow many people who build technology does it concern? | 0.61 | 0.50 | 0.55 | 0.55 | 0.11 | +0.13 | +0.072 |
| Practical relevanceHow useful is it to someone who builds software or tech products? | 0.96 | 0.80 | 0.90 | 0.89 | 0.16 | +0.22 | +0.195 |
| SubstantiatedHow well is it backed? Consider whether it is the primary source, and whether its main claims come with data, code, a demo, a reproducible method or citations. | 0.82 | 0.50 | 0.88 | 0.73 | 0.38 | +0.05 | +0.037 |
| Technical depthHow technically substantive is it? | 0.99 | 0.80 | 0.78 | 0.86 | 0.21 | +0.05 | +0.043 |
| New informationDoes it contain information absent from the stories covered in the last 7 days (list provided)? | 0.83 | 0.80 | 0.99 | 0.87 | 0.19 | +0.05 | +0.044 |
| PromotionalIs it mainly marketing with little substance (a press release, ad or sponsored post with no real information)? A launch post that carries real news is not promotional. | 0.03 | 0.05 | 0.01 | 0.03 | 0.04 | −0.19 | −0.006 |
| OverclaimDo the headline or conclusions claim more than the body supports? | 0.15 | 0.20 | 0.08 | 0.14 | 0.12 | −0.11 | −0.016 |
| Sum of contributions | +0.702 | ||||||
| Claim-check penalty | 0.000 | ||||||
| Total, as published | 0.702 | ||||||
Spread is the highest minus the lowest judge answer. marks a spread above 0.40: the judges disagree, and the story is marked contested.
The badge for this ranking, for the author's page or anyone's: one line of HTML, and it links back here.
<a href="https://rubric.hrih.si/editions/2026-11-05/13/"><img src="https://rubric.hrih.si/badge/2026-11-05/13.svg" alt="Ranked #13 on Rubric, 5 Nov 2026" width="238" height="28"></a>Claim check
Claim check: 2 matches source · 5 no source given · 1 couldn’t check. Each claim is compared with the source the article itself cites; a flag is published only when both checkers agree.
Matches sourceNumber
Django's cache backend defaults to a five-minute timeout.
The cited source says the same thing.
The article says “Django’s cache defaults to five minutes”
The source says “The number of seconds before a cache entry is considered stale”
Source cited by the article: docs.djangoproject.com/en/6.1/ref/settings
Couldn’t checkCausal conclusion
With django-redis, setting DJANGO_REDIS_IGNORE_EXCEPTIONS treats connection errors and timeouts as cache misses, so reads go to the database and writes are skipped.
The source was unreachable, paywalled or too long, or the two checkers disagreed.
The article says “treats connection errors and timeouts as cache misses, so reads go to the database and writes are skipped”
The source says No passage could be compared.
Source cited by the article: github.com/jazzband/django-redis
Matches sourceCausal conclusion
Setting SESSION_ENGINE to Django's cached_db backend makes the cookie-to-user-ID step come from the cache.
The cited source says the same thing.
The article says “set SESSION_ENGINE to Django’s cached_db backend and the cookie-to-user-ID step comes from the cache”
The source says “Session reads use the cache, or the database if the data has been evicted from the cache. To use this backend, set SESSION_ENGINE to "django.contrib.sessions.backends.cached_db”
Source cited by the article: docs.djangoproject.com/en/6.1/topics/http/sessions
No source givenNumber
The team's traffic grew about 20x in two years.
The article gives no link or citation for it.
The article says “Then traffic grew about 20x in two years”
The source says No source to compare with.
No source givenNumber
During the three-month rollout, traffic rose about 40% while average latency fell about 40%, database queries per second halved, and web CPU halved on fewer servers.
The article gives no link or citation for it.
The article says “traffic rose about 40% while average latency fell about 40%, database queries per second halved, and web CPU halved on fewer servers”
The source says No source to compare with.
No source givenNumber
The API peaks around 1,100 requests per second on a typical weekday and once hit 2,300 when a large customer pushed an update to all its users.
The article gives no link or citation for it.
The article says “the API peaks around 1,100 requests per second on a typical weekday, and it once hit 2,300”
The source says No source to compare with.
No source givenNumber
Postgres sees about 0.3 queries per request, and Redis serves most reads at a 97% hit rate.
The article gives no link or citation for it.
The article says “Postgres sees about 0.3 queries per request, and Redis serves most reads at a 97% hit rate”
The source says No source to compare with.
No source givenCausal conclusion
A large customer's single-row edit triggered a signal handler that cleared every key for thousands of users, and the resulting refill herd overloaded the database and degraded the API for several minutes.
The article gives no link or citation for it.
The article says “the thundering herd of refills overloaded the database and degraded the API for several minutes”
The source says No source to compare with.
Also covered by
No other coverage was clustered with this story.
Elsewhere
Elsewhere: HN 2 pts, not on front page
Recorded for context only, checked 5 Nov 2026, 05:46 UTC. It played no part in the ranking.