From 3a4a31dba51067399728203fce3d989b8558a37c Mon Sep 17 00:00:00 2001 From: Boluwatife Popoola Date: Mon, 7 Oct 2024 11:15:10 +0100 Subject: [PATCH] remove caching from lists --- accounts/api.py | 1 - lists/api.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/accounts/api.py b/accounts/api.py index 2255a4f..8d2bb8b 100644 --- a/accounts/api.py +++ b/accounts/api.py @@ -469,7 +469,6 @@ class AccountUpvotedListsAPI(APIView, CustomSizePageNumberPagination): 500: OpenApiResponse(description="Internal server error"), }, ) - @method_decorator(cache_page(60 * 5)) def get(self, request: Request, *args, **kwargs): account_id = kwargs.get("account_id") try: diff --git a/lists/api.py b/lists/api.py index 8c87118..84daa01 100644 --- a/lists/api.py +++ b/lists/api.py @@ -61,7 +61,7 @@ class ListsListAPI(APIView, CustomSizePageNumberPagination): 500: OpenApiResponse(description="Internal server error"), }, ) - @method_decorator(cache_page(60 * 5)) + @method_decorator(cache_page(60 * 1)) def get(self, request: Request, *args, **kwargs): lists = List.objects.all() account_id = request.query_params.get("account") @@ -152,7 +152,7 @@ class ListRegistrationsAPI(APIView, CustomSizePageNumberPagination): 500: OpenApiResponse(description="Internal server error"), }, ) - @method_decorator(cache_page(60 * 5)) + @method_decorator(cache_page(60 * 1)) def get(self, request: Request, *args, **kwargs): list_id = kwargs.get("list_id") try: