From 788fd0c939ff6d2db123ab4d27d0cf8d4aa640e7 Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 27 Dec 2007 21:40:04 +0000 Subject: [PATCH] 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 --- src/python/osrf/cache.py | 5 +++++ 1 file changed, 5 insertions(+) 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 + -- 2.11.0