summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authormgaligniana <marcelogaligniana@gmail.com>2021-12-10 08:26:32 -0300
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-12-13 18:38:48 +0100
commitcc5bbd447bec57165d5bdf062128fdee0df81ee4 (patch)
tree1e42d20a5475015b3af6b027b8f60d1d5c437aa3 /docs/ref
parentc607ee949dc5541c8e946dfd7c96f7f721dd68be (diff)
[4.0.x] Fixed #33338 -- Doc'd that never_cache() decorator set Expires header.
Backport of 669dcefc04837c35fc2ec5ce906d84397005965d from main
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/utils.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt
index d316c8a8bf..25e5fdb2c9 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.