Kaydet (Commit) 41e622e1 authored tarafından Adrian Holovaty's avatar Adrian Holovaty

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

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6308 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst d3c2dd30
......@@ -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`: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
Other optimizations
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment