Fixed #15324 -- Modified the connection creation code for the memcache cache backend. Thanks to dlowe for the report and initial patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15567 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2011-02-19 07:40:09 +00:00
parent f58dd619b8
commit 34662e7a30
1 changed files with 4 additions and 1 deletions

View File

@ -28,7 +28,10 @@ class BaseMemcachedCache(BaseCache):
"""
Implements transparent thread-safe access to a memcached client.
"""
return self._lib.Client(self._servers)
if getattr(self, '_client', None) is None:
self._client = self._lib.Client(self._servers)
return self._client
def _get_memcache_timeout(self, timeout):
"""