Skip to content

Commit

Permalink
fixing cache clear method (#1573)
Browse files Browse the repository at this point in the history
  • Loading branch information
shanbady authored Sep 17, 2024
1 parent c7ebcf6 commit 23b5e38
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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()
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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()
4 changes: 2 additions & 2 deletions learning_resources/management/commands/update_offered_by.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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()
4 changes: 2 additions & 2 deletions learning_resources/management/commands/update_platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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()

0 comments on commit 23b5e38

Please sign in to comment.