diff options
| author | Markus Bertheau <mbertheau@gmail.com> | 2015-04-27 23:56:02 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-04-28 12:07:02 -0400 |
| commit | 4a438e400b7ce0ab9d0b6876196cbe8d620a4171 (patch) | |
| tree | cce5d4a9271ad302eea2ff348b40b738f297dcf5 /docs/topics/http | |
| parent | 82162b4499fc3b83b626c24386e4e5245191d13e (diff) | |
Fixed #13008 -- Added more Cache-Control headers to never_cache() decorator.
Diffstat (limited to 'docs/topics/http')
| -rw-r--r-- | docs/topics/http/decorators.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/topics/http/decorators.txt b/docs/topics/http/decorators.txt index 25616a44c0..a310576fd5 100644 --- a/docs/topics/http/decorators.txt +++ b/docs/topics/http/decorators.txt @@ -97,3 +97,22 @@ caching based on specific request headers. into account when building its cache key. See :ref:`using vary headers <using-vary-headers>`. + +.. module:: django.views.decorators.cache + +Caching +======= + +The decorators in :mod:`django.views.decorators.cache` control server and +client-side caching. + +.. function:: never_cache(view_func) + + This decorator adds a ``Cache-Control: max-age=0, no-cache, no-store, + must-revalidate`` header to a response to indicate that a page should never + be cached. + + .. versionchanged:: 1.9 + + Before Django 1.9, ``Cache-Control: max-age=0`` was sent. This didn't + reliably prevent caching in all browsers. |
