Commit 15e6579b by Ned Batchelder

Merge pull request #2526 from edx/ned/close-global-14-cache

Properly close the global default cache for Django 1.4.
parents 51db66a2 bd5bd2f8
......@@ -162,3 +162,12 @@ common_close_all_caches: |
cache = get_cache(cache_name)
if hasattr(cache, 'close'):
cache.close()
# The 1.4 global default cache object needs to be closed also: 1.4
# doesn't ensure you get the same object when requesting the same
# cache. The global default is a separate Python object from the cache
# you get with get_cache("default"), so it will have its own connection
# that needs to be closed.
cache = django_cache.cache
if hasattr(cache, 'close'):
cache.close()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment