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:
committed by
Tim Graham
parent
08b8c46971
commit
b785927b44
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user