From: erickson Date: Thu, 27 Dec 2007 21:40:04 +0000 (+0000) Subject: added a static method to see if there is already a globally connected cache client X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=788fd0c939ff6d2db123ab4d27d0cf8d4aa640e7;p=working%2FOpenSRF.git added a static method to see if there is already a globally connected cache client git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1187 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/python/osrf/cache.py b/src/python/osrf/cache.py index a62f3e5..b5b3e6c 100644 --- a/src/python/osrf/cache.py +++ b/src/python/osrf/cache.py @@ -57,4 +57,9 @@ class CacheClient(object): 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 +