diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/utils.txt | 4 | ||||
| -rw-r--r-- | docs/topics/http/decorators.txt | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt index 38be571a9e..0b68411e27 100644 --- a/docs/ref/utils.txt +++ b/docs/ref/utils.txt @@ -62,10 +62,14 @@ need to distinguish caches by the ``Accept-language`` header. .. function:: add_never_cache_headers(response) + Adds an ``Expires`` header to the current date/time. + Adds a ``Cache-Control: max-age=0, no-cache, no-store, must-revalidate, private`` header to a response to indicate that a page should never be cached. + Each header is only added if it isn't already set. + .. function:: patch_vary_headers(response, newheaders) Adds (or updates) the ``Vary`` header in the given ``HttpResponse`` object. diff --git a/docs/topics/http/decorators.txt b/docs/topics/http/decorators.txt index cb6fa9cdac..5165765eea 100644 --- a/docs/topics/http/decorators.txt +++ b/docs/topics/http/decorators.txt @@ -118,10 +118,14 @@ client-side caching. .. function:: never_cache(view_func) + This decorator adds an ``Expires`` header to the current date/time. + This decorator adds a ``Cache-Control: max-age=0, no-cache, no-store, must-revalidate, private`` header to a response to indicate that a page should never be cached. + Each header is only added if it isn't already set. + .. module:: django.views.decorators.common Common |
