summaryrefslogtreecommitdiff
path: root/django/core/cache/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/core/cache/__init__.py')
-rw-r--r--django/core/cache/__init__.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/django/core/cache/__init__.py b/django/core/cache/__init__.py
index 613d3632ed..eb7fa5b2e9 100644
--- a/django/core/cache/__init__.py
+++ b/django/core/cache/__init__.py
@@ -60,8 +60,7 @@ cache = ConnectionProxy(caches, DEFAULT_CACHE_ALIAS)
def close_caches(**kwargs):
# Some caches need to do a cleanup at the end of a request cycle. If not
# implemented in a particular backend cache.close() is a no-op.
- for cache in caches.all(initialized_only=True):
- cache.close()
+ caches.close_all()
signals.request_finished.connect(close_caches)