HTTP_ACCEPT should be part of the cache key

This commit is contained in:
Laura Klünder 2016-09-13 21:19:59 +02:00
parent 3614e0656c
commit 3c50466bd8

View file

@ -14,7 +14,7 @@ class CachedViewSetMixin:
return cache_key
def get_cache_params(self, request):
return ''
return request.META.get('HTTP_ACCEPT', '')
def dispatch(self, request, *args, **kwargs):
do_cache = request.method in ('GET', 'HEAD', 'OPTIONS')