1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Documented the cache_control() decorator.

This commit is contained in:
Kevin Christopher Henry
2016-08-11 07:05:16 -04:00
committed by Tim Graham
parent 08b8c46971
commit b785927b44
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,