From c68d1fb5ece254fcda2a5f19312fb3bff3b71021 Mon Sep 17 00:00:00 2001 From: badbl0cks <4161747+badbl0cks@users.noreply.github.com> Date: Thu, 3 Apr 2025 22:12:15 -0700 Subject: [PATCH] Add clear_cache management command --- accounts/management/commands/clear_cache.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 accounts/management/commands/clear_cache.py diff --git a/accounts/management/commands/clear_cache.py b/accounts/management/commands/clear_cache.py new file mode 100644 index 0000000..8c6863f --- /dev/null +++ b/accounts/management/commands/clear_cache.py @@ -0,0 +1,7 @@ +from django.core.management.base import BaseCommand +from django.core.cache import cache + +class Command(BaseCommand): + def handle(self, *args, **kwargs): + cache.clear() + self.stdout.write('Cleared cache\n') \ No newline at end of file