Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Russell Keith-Magee authored February 19, 2011

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  django/core/cache/backends/memcached.py
5  django/core/cache/backends/memcached.py
@@ -28,7 +28,10 @@ def _cache(self):
28 28
         """
29 29
         Implements transparent thread-safe access to a memcached client.
30 30
         """
31  
-        return self._lib.Client(self._servers)
  31
+        if getattr(self, '_client', None) is None:
  32
+            self._client = self._lib.Client(self._servers)
  33
+
  34
+        return self._client
32 35
 
33 36
     def _get_memcache_timeout(self, timeout):
34 37
         """

0 notes on commit 34662e7

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