summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorHonza Král <honza.kral@gmail.com>2010-10-29 01:31:15 +0000
committerHonza Král <honza.kral@gmail.com>2010-10-29 01:31:15 +0000
commitcb17f7ca2252265ab4a844e7924cb8ebab4a1a76 (patch)
tree7aaf1bdfab5ea33a83bab1567b3967f90ed792e8 /docs
parent8a724802c5b3b8d4f8d51bcf276838bf0f4ba176 (diff)
Fixed #14560 -- Enable HEAD requests to be cached properly. Thanks, codemonkey!
Introducing ability to cache HEAD requests and GET requests separately by adding the method to the cache key while preserving the functionality that HEAD requests can use cached reponses generated by a GET request. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/cache.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt
index 5797199411..f2b7a594d3 100644
--- a/docs/topics/cache.txt
+++ b/docs/topics/cache.txt
@@ -328,7 +328,9 @@ parameters. Optionally, if the ``CACHE_MIDDLEWARE_ANONYMOUS_ONLY`` setting is
will be cached. This is a simple and effective way of disabling caching for any
user-specific pages (include Django's admin interface). Note that if you use
``CACHE_MIDDLEWARE_ANONYMOUS_ONLY``, you should make sure you've activated
-``AuthenticationMiddleware``.
+``AuthenticationMiddleware``. The cache middleware expects that a HEAD request
+is answered with the same response headers exactly like the corresponding GET
+request, in that case it could return cached GET response for HEAD request.
Additionally, the cache middleware automatically sets a few headers in each
``HttpResponse``: