mirror of
https://github.com/django/django.git
synced 2025-04-06 22:46:41 +00:00
[1.10.x] Fixed #27616 -- Fixed incorrect vary_on_headers() example.
Backport of 5e239ae907291d07a3fcf9329f83c27fa6d72981 from master
This commit is contained in:
parent
2f95b91bbe
commit
54cce02ddd
@ -366,7 +366,7 @@ Methods
|
||||
If a response varies on whether or not it's requested via AJAX and you are
|
||||
using some form of caching like Django's :mod:`cache middleware
|
||||
<django.middleware.cache>`, you should decorate the view with
|
||||
:func:`vary_on_headers('HTTP_X_REQUESTED_WITH')
|
||||
:func:`vary_on_headers('X-Requested-With')
|
||||
<django.views.decorators.vary.vary_on_headers>` so that the responses are
|
||||
properly cached.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user