9👍
✅
To be sure, decorate it with @never_cache
:
from django.views.decorators.cache import never_cache
@never_cache
def myview(request):
# ...
As in The per-view cache documentation.
0👍
Django does not cache views unless you specify a per-view cache.
If you have problems with (cached) Ajax responses, try to add a timestamp to your URL:
e.g. /my_view?ts=23432453453
So you can be sure that your browser does not cache the Ajax responses.
- [Django]-Django 1.5 select_for_update considered fragile design
- [Django]-Django: Nested variables in templates
- [Django]-Django – Is it possible to make a redirect from a function in a view?
- [Django]-Managing a pool of connections to a hosted Elastic Search provider
Source:stackexchange.com