added a static method to see if there is already a globally connected cache client
[OpenSRF.git] / 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
+