From d2677674eec9cebaa0748d8035cc1ac8329444e2 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 18 Mar 2016 12:49:48 +0200 Subject: Clear ALL caches, not just default --- servo/management/commands/clearcache.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'servo') diff --git a/servo/management/commands/clearcache.py b/servo/management/commands/clearcache.py index 7c00ef4..ce96459 100644 --- a/servo/management/commands/clearcache.py +++ b/servo/management/commands/clearcache.py @@ -1,12 +1,15 @@ # -*- coding: utf-8 -*- -from django.core.cache import cache +from django.core.cache import caches from django.core.management.base import BaseCommand class Command(BaseCommand): - help = "Clears this install's cache" + help = "Clears this install's caches" def handle(self, *args, **options): - cache.clear() + for c in caches.all(): + c.clear() + + exit(0) -- cgit v1.2.3