1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.10.x] Documented the cache_control() decorator.

Backport of b785927b44 from master
This commit is contained in:
Kevin Christopher Henry
2016-08-11 07:05:16 -04:00
committed by Tim Graham
parent 6977eaf844
commit 80e0ff7f91
2 changed files with 21 additions and 11 deletions

View File

@@ -106,6 +106,13 @@ Caching
The decorators in :mod:`django.views.decorators.cache` control server and
client-side caching.
.. function:: cache_control(**kwargs)
This decorator patches the response's ``Cache-Control`` header by adding
all of the keyword arguments to it. See
:func:`~django.utils.cache.patch_cache_control` for the details of the
transformation.
.. function:: never_cache(view_func)
This decorator adds a ``Cache-Control: max-age=0, no-cache, no-store,