Add command for clearing the course cache

This commit is contained in:
Ramon Wenger 2022-12-08 17:06:25 +01:00
parent 41c6346136
commit 09e22a7616
1 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,8 @@
from django.core.management.base import BaseCommand
from django.core.cache import caches
class Command(BaseCommand):
def handle(self, *args, **options):
self.stdout.write("Clearing course cache")
caches["api_page_cache"].clear()