diff --git a/django/test/signals.py b/django/test/signals.py index 68e6ad3fb6..3503fc08e1 100644 --- a/django/test/signals.py +++ b/django/test/signals.py @@ -26,7 +26,8 @@ COMPLEX_OVERRIDE_SETTINGS = {'DATABASES'} @receiver(setting_changed) def clear_cache_handlers(**kwargs): if kwargs['setting'] == 'CACHES': - from django.core.cache import caches + from django.core.cache import caches, close_caches + close_caches() caches._caches = Local()