From 4b1ad4546a1c468202d683e35f11e9635efbe3d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=86=D0=B2=D0=B0=D0=BD=20=D0=9D=D1=94=D0=B4=D1=94=D0=BB?= =?UTF-8?q?=D1=8C=D0=BD=D1=96=D1=86=D0=B5=D0=B2?= Date: Tue, 16 Apr 2024 15:50:23 +0300 Subject: [PATCH] fix: [AXIMST-806] change course version to edited timestamp --- lms/djangoapps/course_home_api/outline/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/course_home_api/outline/views.py b/lms/djangoapps/course_home_api/outline/views.py index 1d02261dbc0c..ebe0f9c2e0b5 100644 --- a/lms/djangoapps/course_home_api/outline/views.py +++ b/lms/djangoapps/course_home_api/outline/views.py @@ -416,7 +416,7 @@ class CourseNavigationBlocksView(RetrieveAPIView): serializer_class = CourseBlockSerializer COURSE_BLOCKS_CACHE_KEY_TEMPLATE = ( - 'course_sidebar_blocks_{course_key_string}_{course_version}_{user_id}_{user_cohort_id}' + 'course_sidebar_blocks_{course_key_string}_{course_edited_timestamp}_{user_id}_{user_cohort_id}' '_{enrollment_mode}_{allow_public}_{allow_public_outline}_{is_masquerading}' ) COURSE_BLOCKS_CACHE_TIMEOUT = 60 * 60 # 1 hour @@ -451,7 +451,7 @@ def get(self, request, *args, **kwargs): cache_key = self.COURSE_BLOCKS_CACHE_KEY_TEMPLATE.format( course_key_string=course_key_string, - course_version=str(course.course_version), + course_edited_timestamp=str(course.subtree_edited_on.timestamp()), user_id=request.user.id, enrollment_mode=getattr(enrollment, 'mode', ''), user_cohort_id=getattr(user_cohort, 'id', ''),