A response such as
{{{
Cache-Control: private
Content-Type: text/plain
Here is your own special random number: 42
}}}
should be cacheable only by the user's own browser [more or less], but
Django currently reuses the response for subsequent requests from
''anyone''.
Some workarounds might be:
* use @never_cache or similar to ensure a max-age of 0 which **is**
respected by the cache middleware, but also prevents the users own private
cache from storing
* make sure the response varies on something private to the user (i.e.
`Vary: Cookie`) in which case the entry will still be stored in a shared —
but now less accessible — manner
--
Ticket URL: <https://code.djangoproject.com/ticket/28833>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* component: Core (Cache system) => HTTP handling
* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/28833#comment:1>
* owner: nobody => Srinivas Reddy Thatiparthy
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28833#comment:2>
* owner: Srinivas Reddy Thatiparthy => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/28833#comment:3>
* owner: (none) => shangdahao
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28833#comment:4>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/9667 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/28833#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"d968788b57f41b7def88046d1178fd2932a32a4e" d968788b]:
{{{
#!CommitTicketReference repository=""
revision="d968788b57f41b7def88046d1178fd2932a32a4e"
Fixed #28833 -- Prevented CacheMiddleware from caching responses with
"Cache-Control: private".
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28833#comment:6>