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/ref | |
| parent | 82162b4499fc3b83b626c24386e4e5245191d13e (diff) | |
Fixed #13008 -- Added more Cache-Control headers to never_cache() decorator.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/contrib/admin/index.txt | 2 | ||||
| -rw-r--r-- | docs/ref/utils.txt | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index d6a5312e73..85fc4cb6ff 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -1474,7 +1474,7 @@ templates used by the :class:`ModelAdmin` views: url(r'^my_view/$', self.admin_site.admin_view(self.my_view)) This wrapping will protect ``self.my_view`` from unauthorized access and - will apply the ``django.views.decorators.cache.never_cache`` decorator to + will apply the :func:`django.views.decorators.cache.never_cache` decorator to make sure it is not cached if the cache middleware is active. If the page is cacheable, but you still want the permission check to be diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt index 18312957fc..7912edd5ce 100644 --- a/docs/ref/utils.txt +++ b/docs/ref/utils.txt @@ -65,7 +65,13 @@ need to distinguish caches by the ``Accept-language`` header. .. function:: add_never_cache_headers(response) - Adds headers to a response to indicate that a page should never be cached. + 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. .. function:: patch_vary_headers(response, newheaders) |
