diff --git a/backend/core/views.py b/backend/core/views.py index f35692ba9..08d9dbc5f 100644 --- a/backend/core/views.py +++ b/backend/core/views.py @@ -1723,6 +1723,8 @@ def quality_check(self, request): ] return Response({"results": res}) + @method_decorator(cache_page(60 * SHORT_CACHE_TTL)) + @method_decorator(vary_on_cookie) @action(detail=True, methods=["get"]) def global_score(self, request, pk): """Returns the global score of the compliance assessment""" @@ -1820,6 +1822,8 @@ def export(self, request, pk): else: return Response({"error": "Permission denied"}) + @method_decorator(cache_page(60 * SHORT_CACHE_TTL)) + @method_decorator(vary_on_cookie) @action(detail=True, methods=["get"]) def donut_data(self, request, pk): compliance_assessment = ComplianceAssessment.objects.get(id=pk)