1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #23755 -- Added support for multiple field names in the no-cache Cache-Control directive to patch_cache_control().

https://tools.ietf.org/html/rfc7234#section-5.2.2.2
This commit is contained in:
Flavio Curella
2019-09-26 13:58:14 -07:00
committed by Mariusz Felisiak
parent 2a6f45e08e
commit ed112fadc1
5 changed files with 43 additions and 8 deletions

View File

@@ -43,6 +43,11 @@ need to distinguish caches by the ``Accept-language`` header.
* All other parameters are added with their value, after applying
``str()`` to it.
.. versionchanged:: 3.1
Support for multiple field names in the ``no-cache`` directive was
added.
.. function:: get_max_age(response)
Returns the max-age from the response Cache-Control header as an integer

View File

@@ -104,7 +104,10 @@ Minor features
Cache
~~~~~
* ...
* The :func:`~django.views.decorators.cache.cache_control` decorator and
:func:`~django.utils.cache.patch_cache_control` method now support multiple
field names in the ``no-cache`` directive for the ``Cache-Control`` header,
according to :rfc:`7234#section-5.2.2.2`.
CSRF
~~~~

View File

@@ -1277,6 +1277,7 @@ Here are some more examples:
* ``no_transform=True``
* ``must_revalidate=True``
* ``stale_while_revalidate=num_seconds``
* ``no_cache=True``
The full list of known directives can be found in the `IANA registry`_
(note that not all of them apply to responses).