Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #15324 -- Modified the connection creation code for the memcach…

…e 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
  • Loading branch information...
commit 34662e7a301e651df6d8e7d978b0138c3dce76e4 1 parent f58dd61
@freakboy3742 freakboy3742 authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 django/core/cache/backends/memcached.py
View
5 django/core/cache/backends/memcached.py
@@ -28,7 +28,10 @@ def _cache(self):
"""
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):
"""

0 comments on commit 34662e7

Please sign in to comment.
Something went wrong with that request. Please try again.