first commit
This commit is contained in:
10
settings/management/commands/clear_cache.py
Normal file
10
settings/management/commands/clear_cache.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.core.cache import cache
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Clear the cache'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
cache.clear()
|
||||
self.stdout.write(self.style.SUCCESS('Cache cleared successfully'))
|
||||
Reference in New Issue
Block a user