Skip to content

Commit

Permalink
feat(ig): cache interest groups
Browse files Browse the repository at this point in the history
  • Loading branch information
aswanthabam committed Oct 31, 2024
1 parent 3600ddd commit 2602e91
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/dashboard/ig/dash_ig_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 2602e91

Please sign in to comment.