mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Refs #31949 -- Made @vary_on_(cookie/headers) decorators work with async functions.
This commit is contained in:
parent
fb1c763506
commit
b7a17b0ea0
5 changed files with 97 additions and 6 deletions
|
@ -94,6 +94,8 @@ view functions:
|
|||
* :func:`~django.views.decorators.http.require_GET`
|
||||
* :func:`~django.views.decorators.http.require_POST`
|
||||
* :func:`~django.views.decorators.http.require_safe`
|
||||
* :func:`~django.views.decorators.vary.vary_on_cookie`
|
||||
* :func:`~django.views.decorators.vary.vary_on_headers`
|
||||
* ``xframe_options_deny()``
|
||||
* ``xframe_options_sameorigin()``
|
||||
* ``xframe_options_exempt()``
|
||||
|
|
|
@ -115,6 +115,10 @@ caching based on specific request headers.
|
|||
|
||||
.. function:: vary_on_cookie(func)
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for wrapping asynchronous view functions was added.
|
||||
|
||||
.. function:: vary_on_headers(*headers)
|
||||
|
||||
The ``Vary`` header defines which request headers a cache mechanism should take
|
||||
|
@ -122,6 +126,10 @@ caching based on specific request headers.
|
|||
|
||||
See :ref:`using vary headers <using-vary-headers>`.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for wrapping asynchronous view functions was added.
|
||||
|
||||
.. module:: django.views.decorators.cache
|
||||
|
||||
Caching
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue