summaryrefslogtreecommitdiff
path: root/django/core/cache/__init__.py
diff options
context:
space:
mode:
authorRamin Farajpour Cami <ramin.blackhat@gmail.com>2016-11-12 20:41:23 +0330
committerTim Graham <timograham@gmail.com>2016-11-14 12:30:46 -0500
commit967be82443b5640d61608a89897d8ce2bc44fa54 (patch)
tree9905e1156e27aa3d1226da3dde1223a5087b0d55 /django/core/cache/__init__.py
parent6072de727f0ffa7bf0aa67aadba5d4589561974d (diff)
Fixed E305 flake8 warnings.
Diffstat (limited to 'django/core/cache/__init__.py')
-rw-r--r--django/core/cache/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/django/core/cache/__init__.py b/django/core/cache/__init__.py
index 26897ff850..cd2bb43886 100644
--- a/django/core/cache/__init__.py
+++ b/django/core/cache/__init__.py
@@ -84,6 +84,7 @@ class CacheHandler(object):
def all(self):
return getattr(self._caches, 'caches', {}).values()
+
caches = CacheHandler()
@@ -112,6 +113,7 @@ class DefaultCacheProxy(object):
def __ne__(self, other):
return caches[DEFAULT_CACHE_ALIAS] != other
+
cache = DefaultCacheProxy()
@@ -121,4 +123,6 @@ def close_caches(**kwargs):
# cache.close is a no-op
for cache in caches.all():
cache.close()
+
+
signals.request_finished.connect(close_caches)