Browse files

Fixed #5284 -- Documented never_cache decorator. Thanks, xbito

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent d3c2dd3 commit 41e622e17056a4acc7f14df9535aa34938c6c75d @adrianholovaty adrianholovaty committed Sep 15, 2007
Showing with 9 additions and 0 deletions.
  1. +9 −0 docs/cache.txt
9 docs/cache.txt
@@ -524,6 +524,15 @@ the value of the ``CACHE_MIDDLEWARE_SETTINGS`` setting. If you use a custom
``max_age`` in a ``cache_control`` decorator, the decorator will take
precedence, and the header values will be merged correctly.)
+If you want to use headers to disable caching altogether,
+``django.views.decorators.never_cache`` is a view decorator that adds
+headers to ensure the response won't be cached by browsers or other caches. Example::
+ from django.views.decorators.cache import never_cache
+ @never_cache
+ def myview(request):
+ ...
.. _`Cache-Control spec`:
Other optimizations

0 comments on commit 41e622e

Please sign in to comment.