Add clear_cache management command
This commit is contained in:
parent
fa4f38301b
commit
c68d1fb5ec
1 changed files with 7 additions and 0 deletions
7
accounts/management/commands/clear_cache.py
Normal file
7
accounts/management/commands/clear_cache.py
Normal file
|
|
@ -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')
|
||||||
Loading…
Add table
Add a link
Reference in a new issue