Add clear cache management command

This commit is contained in:
Nyymix 2025-04-24 23:32:50 +03:00
parent 7a419f3b14
commit 59a4ffc4ff

View file

@ -0,0 +1,10 @@
from django.core.cache import cache
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = "Clears the entire Django cache."
def handle(self, *args, **options):
cache.clear()
self.stdout.write(self.style.SUCCESS("Cache cleared successfully."))