1
0
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:
Ben Lomax
2023-07-08 21:54:37 +01:00
committed by Mariusz Felisiak
parent fb1c763506
commit b7a17b0ea0
5 changed files with 97 additions and 6 deletions

View File

@@ -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