From 06a21840d16ca0502833de4daee5b94105e1a9e1 Mon Sep 17 00:00:00 2001 From: Federico Capoano Date: Fri, 11 Sep 2015 14:49:12 +0200 Subject: [PATCH] Disabled DRF cache_response decorator #264 --- nodeshot/core/cms/views.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/nodeshot/core/cms/views.py b/nodeshot/core/cms/views.py index 32f819d8..df87b758 100644 --- a/nodeshot/core/cms/views.py +++ b/nodeshot/core/cms/views.py @@ -3,8 +3,9 @@ from nodeshot.core.base.mixins import ACLMixin # cache -from rest_framework_extensions.cache.decorators import cache_response -from nodeshot.core.base.cache import cache_by_group +# TODO: +# from rest_framework_extensions.cache.decorators import cache_response +# from nodeshot.core.base.cache import cache_by_group from .serializers import * # noqa from .models import Page, MenuItem @@ -18,7 +19,7 @@ class PageList(ACLMixin, generics.ListAPIView): queryset = Page.objects.published() serializer_class = PageListSerializer - @cache_response(86400, key_func=cache_by_group) + # @cache_response(86400, key_func=cache_by_group) def get(self, request, *args, **kwargs): return super(PageList, self).get(request, *args, **kwargs) @@ -34,7 +35,7 @@ class PageDetail(ACLMixin, generics.RetrieveAPIView): serializer_class = PageDetailSerializer lookup_field = 'slug' - @cache_response(86400, key_func=cache_by_group) + # @cache_response(86400, key_func=cache_by_group) def get(self, request, *args, **kwargs): return super(PageDetail, self).get(request, *args, **kwargs) @@ -52,7 +53,7 @@ class MenuList(ACLMixin, generics.ListAPIView): queryset = MenuItem.objects.published().filter(parent=None) serializer_class = MenuSerializer - @cache_response(86400, key_func=cache_by_group) + # @cache_response(86400, key_func=cache_by_group) def get(self, request, *args, **kwargs): return super(MenuList, self).get(request, *args, **kwargs)