Source code for bits.management.commands.clear_cache
"""
Clears the cache via `django.core.cache.cache.clear`
::
>>> python manage.py clear_cache
Cleared Cache
"""
###############################################################################
## Imports
###############################################################################
from django.core.management.base import BaseCommand
from django.core.cache import cache
###############################################################################
## Command
###############################################################################
[docs]class Command(BaseCommand):
help = 'clears django caches'
[docs] def handle(self, *args, **kwargs):
cache.clear()
self.stdout.write('Cleared cache\n')