From 2602e91db08514887a781cb9cdf9b46b563e9e17 Mon Sep 17 00:00:00 2001 From: Aswanth Vc Date: Thu, 31 Oct 2024 21:25:06 +0530 Subject: [PATCH] feat(ig): cache interest groups --- api/dashboard/ig/dash_ig_view.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/dashboard/ig/dash_ig_view.py b/api/dashboard/ig/dash_ig_view.py index 78895519..908fc1b7 100644 --- a/api/dashboard/ig/dash_ig_view.py +++ b/api/dashboard/ig/dash_ig_view.py @@ -11,6 +11,8 @@ InterestGroupSerializer, InterestGroupCreateUpdateSerializer, ) +from django.utils.decorators import method_decorator +from django.views.decorators.cache import cache_page from api.dashboard.roles.dash_roles_serializer import RoleDashboardSerializer from db.user import Role @@ -260,6 +262,7 @@ def get(self, request, pk): class InterestGroupListApi(APIView): + @method_decorator(cache_page(60 * 10)) def get(self, request): ig = ( InterestGroup.objects.all()