Skip to content

Commit

Permalink
Disabled DRF cache_response decorator #264
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Sep 11, 2015
1 parent 6373e23 commit 06a2184
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions nodeshot/core/cms/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand All @@ -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)

Expand All @@ -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)

Expand Down

0 comments on commit 06a2184

Please sign in to comment.