diff --git a/learning_resources/management/commands/populate_featured_lists.py b/learning_resources/management/commands/populate_featured_lists.py index 4f33a9b157..675c78f3b3 100644 --- a/learning_resources/management/commands/populate_featured_lists.py +++ b/learning_resources/management/commands/populate_featured_lists.py @@ -16,7 +16,7 @@ LearningResource, LearningResourceOfferor, ) -from main.utils import clear_cache, now_in_utc +from main.utils import clear_search_cache, now_in_utc class Command(BaseCommand): @@ -90,4 +90,4 @@ def handle(self, *args, **options): # noqa: ARG002 "Population of unit channel featured lists finished, " f"took {total_seconds} seconds" ) - clear_cache() + clear_search_cache() diff --git a/learning_resources/management/commands/update_departments_schools.py b/learning_resources/management/commands/update_departments_schools.py index 8832959531..87cff3e190 100644 --- a/learning_resources/management/commands/update_departments_schools.py +++ b/learning_resources/management/commands/update_departments_schools.py @@ -6,7 +6,7 @@ upsert_department_data, upsert_school_data, ) -from main.utils import clear_cache, now_in_utc +from main.utils import clear_search_cache, now_in_utc class Command(BaseCommand): @@ -26,4 +26,4 @@ def handle(self, *args, **options): # noqa: ARG002 f"Update of {len(schools)} schools & {len(departments)} " f"departments finished, took {total_seconds} seconds" ) - clear_cache() + clear_search_cache() diff --git a/learning_resources/management/commands/update_offered_by.py b/learning_resources/management/commands/update_offered_by.py index 826ed1b129..65d0783bab 100644 --- a/learning_resources/management/commands/update_offered_by.py +++ b/learning_resources/management/commands/update_offered_by.py @@ -3,7 +3,7 @@ from django.core.management import BaseCommand from learning_resources.utils import upsert_offered_by_data -from main.utils import clear_cache, now_in_utc +from main.utils import clear_search_cache, now_in_utc class Command(BaseCommand): @@ -21,4 +21,4 @@ def handle(self, *args, **options): # noqa: ARG002 self.stdout.write( f"Update of {len(offerors)} offerors finished, took {total_seconds} seconds" ) - clear_cache() + clear_search_cache() diff --git a/learning_resources/management/commands/update_platforms.py b/learning_resources/management/commands/update_platforms.py index 309071a180..b4e7152a55 100644 --- a/learning_resources/management/commands/update_platforms.py +++ b/learning_resources/management/commands/update_platforms.py @@ -3,7 +3,7 @@ from django.core.management import BaseCommand from learning_resources.utils import upsert_platform_data -from main.utils import clear_cache, now_in_utc +from main.utils import clear_search_cache, now_in_utc class Command(BaseCommand): @@ -21,4 +21,4 @@ def handle(self, *args, **options): # noqa: ARG002 self.stdout.write( f"Upserted {len(platform_codes)} platforms, took {total_seconds} seconds" ) - clear_cache() + clear_search_cache()