added a static method to see if there is already a globally connected cache client
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 27 Dec 2007 21:40:04 +0000 (21:40 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 27 Dec 2007 21:40:04 +0000 (21:40 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1187 9efc2488-bf62-4759-914b-345cdb29e865

src/python/osrf/cache.py

index a62f3e5..b5b3e6c 100644 (file)
@@ -57,4 +57,9 @@ class CacheClient(object):
         osrf.log.log_debug("cache: connecting to servers %s" % str(svrs))
         _client = memcache.Client(svrs, debug=1)
 
         osrf.log.log_debug("cache: connecting to servers %s" % str(svrs))
         _client = memcache.Client(svrs, debug=1)
 
+    @staticmethod
+    def get_client():
+        global _client
+        return _client
+