[Django] #23054: Document limitations of cache middleware more clearly

2 views
Skip to first unread message

Django

unread,
Jul 17, 2014, 1:17:47 PM7/17/14
to django-...@googlegroups.com
#23054: Document limitations of cache middleware more clearly
-----------------------------------------+------------------------
Reporter: carljm | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
Our documentation for the
[https://docs.djangoproject.com/en/dev/topics/cache/#the-per-site-cache
full-page-caching middleware] does not discuss Vary: Cookie at all, which
is a major omission. For most typical dynamic Django sites, every single
page served will rely on a user-specific cookie of some kind (whether that
be a session cookie, a CSRF cookie, a messages cookie, or a tracking
cookie (Google Analytics et al)). This means that (unless there is another
bug) the response should include Vary: Cookie, turning the full-page cache
into a per-user cache, dramatically ballooning its size-to-hits ratio,
which is almost certainly not what the developer expected or intended.

In my opinion this means that the cache middleware is simply not suitable
for use on most Django sites, which raises the question of whether it
belongs in Django at all. But at the very least this issue should be
clearly discussed in the documentation.

I can put together a pull request for this soon, just filing the ticket so
as not to lose track of it.

--
Ticket URL: <https://code.djangoproject.com/ticket/23054>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 28, 2026, 11:07:10 PM (2 days ago) Jan 28
to django-...@googlegroups.com
#23054: Document limitations of cache middleware more clearly
-------------------------------+-------------------------------------------
Reporter: Carl Meyer | Owner: Ahmed Shammas J
Type: Bug | Status: assigned
Component: Documentation | Version: 1.6
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+-------------------------------------------
Changes (by Ahmed Shammas J):

* owner: nobody => Ahmed Shammas J
* status: new => assigned

Comment:

I'm Ahmed Shammas, a GSoC 2026 aspirant. I've prepared a fix for this
documentation omission and am about to submit the Pull Request.
--
Ticket URL: <https://code.djangoproject.com/ticket/23054#comment:1>

Django

unread,
Jan 28, 2026, 11:16:26 PM (2 days ago) Jan 28
to django-...@googlegroups.com
#23054: Document limitations of cache middleware more clearly
-------------------------------+-------------------------------------------
Reporter: Carl Meyer | Owner: Ahmed Shammas J
Type: Bug | Status: assigned
Component: Documentation | Version: 1.6
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+-------------------------------------------
Comment (by Ahmed Shammas J):

Pull Request Submitted : https://github.com/django/django/pull/20612
--
Ticket URL: <https://code.djangoproject.com/ticket/23054#comment:2>
Reply all
Reply to author
Forward
0 new messages