clearcache.py 322 B

1234567891011
  1. from django.core.cache import cache
  2. from django.core.management.base import BaseCommand
  3. class Command(BaseCommand):
  4. """Command to clear the entire cache."""
  5. help = 'Clears the cache.'
  6. def handle(self, *args, **kwargs):
  7. cache.clear()
  8. self.stdout.write('Cache has been cleared.', ending="\n")