Closed luckygogreen closed 2 years ago
I try to use DRF-extensions for the caches. but same queryset ,Will produce different sql query time, my code:
... class ....: queryset = Users.objects.select_related('location', 'status', 'department', 'position', 'payper') ...
class ....: queryset = Users.objects.select_related('location', 'status', 'department', 'position', 'payper')
def list(self, request, *args, **kwargs): https://i.stack.imgur.com/EnTWZ.png
def list(self, request, *args, **kwargs):
@cache_response(timeout=60 60, key_func=StaffListKeyConstructor()) def list(self, request, args, **kwargs): https://i.stack.imgur.com/3km9Y.png
is this a bug ? @akx @thedrow @vshih @nofeet @fladi
I try to use DRF-extensions for the caches. but same queryset ,Will produce different sql query time, my code:
...
class ....: queryset = Users.objects.select_related('location', 'status', 'department', 'position', 'payper')
...no DRF-extensions
def list(self, request, *args, **kwargs):
https://i.stack.imgur.com/EnTWZ.pngDRF-extensions
@cache_response(timeout=60 60, key_func=StaffListKeyConstructor()) def list(self, request, args, **kwargs): https://i.stack.imgur.com/3km9Y.png
is this a bug ? @akx @thedrow @vshih @nofeet @fladi