As per the title...
Is there a way I can force a particular view (actually a particular JSON-formatted set of results, that will be served to Ajax queries) NEVER to cache in Django?
Thanks!
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With