mirror of
https://github.com/django/django.git
synced 2025-01-27 10:39:40 +00:00
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:
parent
f58dd619b8
commit
34662e7a30
5
django/core/cache/backends/memcached.py
vendored
5
django/core/cache/backends/memcached.py
vendored
@ -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):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user