diff --git a/gallery/management/commands/clear_cache.py b/gallery/management/commands/clear_cache.py new file mode 100644 index 0000000..f7de669 --- /dev/null +++ b/gallery/management/commands/clear_cache.py @@ -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.")) \ No newline at end of file