fix: never_cache sync wrapper broke async dispatch - add async_never_cache_dispatch (wallet/login_record/tasks)

This commit is contained in:
async-upgrade
2026-09-06 16:27:17 +08:00
parent cf79c92927
commit 50ae676bb2
4 changed files with 45 additions and 10 deletions
+4 -3
View File
@@ -6,6 +6,7 @@ from django.utils.decorators import method_decorator
from django.views.decorators.cache import never_cache
from datetime import timedelta
from utils.async_decorators import async_never_cache_dispatch
from utils.response_codes import (
ResponseCode,
create_standardized_response,
@@ -18,7 +19,7 @@ from drf_yasg import openapi
from chunyu_project.common_schemas import success_response, error_response, unauthorized_response, not_found_response
@method_decorator(never_cache, name='dispatch')
@async_never_cache_dispatch
class LoginRecordListAPIView(APIView):
permission_classes = [IsAuthenticated]
@@ -87,7 +88,7 @@ class LoginRecordListAPIView(APIView):
)
@method_decorator(never_cache, name='dispatch')
@async_never_cache_dispatch
class LoginRecordDeleteAPIView(APIView):
permission_classes = [IsAuthenticated]
@@ -117,7 +118,7 @@ class LoginRecordDeleteAPIView(APIView):
)
@method_decorator(never_cache, name='dispatch')
@async_never_cache_dispatch
class LoginRecordClearAPIView(APIView):
permission_classes = [IsAuthenticated]