mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #31949 -- Made @vary_on_(cookie/headers) decorators work with async functions.
This commit is contained in:
committed by
Mariusz Felisiak
parent
fb1c763506
commit
b7a17b0ea0
@@ -268,6 +268,8 @@ Decorators
|
||||
* :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()``
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user