diff --git a/django/core/cache/__init__.py b/django/core/cache/__init__.py index 721e24921cf..c362800dcc9 100644 --- a/django/core/cache/__init__.py +++ b/django/core/cache/__init__.py @@ -146,6 +146,7 @@ class DefaultCacheProxy(object): cache = DefaultCacheProxy() + def close_caches(**kwargs): # Some caches -- python-memcached in particular -- need to do a cleanup at the # end of a request cycle. If not implemented in a particular backend diff --git a/tests/cache/tests.py b/tests/cache/tests.py index 5ca9a7d4db1..12e75e24b7c 100644 --- a/tests/cache/tests.py +++ b/tests/cache/tests.py @@ -1147,10 +1147,11 @@ class CustomCacheKeyValidationTests(TestCase): @override_settings( CACHES={ - 'default': { - 'BACKEND': 'cache.closeable_cache.CacheClass', - } - },) + 'default': { + 'BACKEND': 'cache.closeable_cache.CacheClass', + } + } +) class GetCacheTests(IgnorePendingDeprecationWarningsMixin, TestCase): def test_simple(self):