diff options
| author | Moayad Mardini <moayad.m@gmail.com> | 2014-07-25 11:42:06 +0300 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-07-25 06:26:41 -0400 |
| commit | d8961a5ad05b103b7b37e8e7a992f5d2f761fc2c (patch) | |
| tree | 192a3ba5baaf70a911a191d0f25240de3e0ea158 /docs | |
| parent | 2127b6fe9918dc51b6d170fef6eed7f42485436d (diff) | |
[1.7.x] Fixed #22827 -- clarified what each cache middleware does.
Thanks Keryn Knight for the report.
Backport of f9b7a0383c from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/cache.txt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt index 6970ee85e2..055add89ba 100644 --- a/docs/topics/cache.txt +++ b/docs/topics/cache.txt @@ -465,14 +465,14 @@ Then, add the following required settings to your Django settings file: the site, or some other string that is unique to this Django instance, to prevent key collisions. Use an empty string if you don't care. -The cache middleware caches GET and HEAD responses with status 200, where the request -and response headers allow. Responses to requests for the same URL with different -query parameters are considered to be unique pages and are cached separately. -The cache middleware expects that a HEAD request is answered with the same -response headers as the corresponding GET request; in which case it can return -a cached GET response for HEAD request. +``FetchFromCacheMiddleware`` caches GET and HEAD responses with status 200, +where the request and response headers allow. Responses to requests for the same +URL with different query parameters are considered to be unique pages and are +cached separately. This middleware expects that a HEAD request is answered with +the same response headers as the corresponding GET request; in which case it can +return a cached GET response for HEAD request. -Additionally, the cache middleware automatically sets a few headers in each +Additionally, ``UpdateCacheMiddleware`` automatically sets a few headers in each :class:`~django.http.HttpResponse`: * Sets the ``Last-Modified`` header to the current date/time when a fresh |
