Skip to content

Commit

Permalink
feat: reduce cache timeot value to comply with usecase
Browse files Browse the repository at this point in the history
  • Loading branch information
GlugovGrGlib committed Apr 23, 2024
1 parent bf19fe2 commit d75fd6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lms/djangoapps/grades/rest_api/v1/gradebook_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,11 +670,11 @@ def get(self, request, course_key): # lint-amnesty, pylint: disable=too-many-st
serializer = StudentGradebookEntrySerializer(entries, many=True)
return self.get_paginated_response(serializer.data, **users_counts)

def _get_user_count(self, query_args, cache_time=3600, annotations=None):
def _get_user_count(self, query_args, cache_time=600, annotations=None):
"""
Return the user count for the given query arguments to CourseEnrollment.
caches the count for cache_time seconds.
Caches the count for cache_time seconds, the default value is 10 minutes.
"""
queryset = CourseEnrollment.objects
if annotations:
Expand Down

0 comments on commit d75fd6c

Please sign in to comment.