def client(self): """Get the native memcache client. Returns: `memcache.Client` instance. """ if self._client is None: self._client = Client_(self.servers) return self._client
def client(self): """Get the native memcache client. Returns: `memcache.Client` instance. """ if self._client is None: #print "Connected memcached client %s" % str(self) self._client = Client_(self.servers) return self._client
def test_servers(self): """Test that memcached servers are servicing requests. Returns: set: URIs of servers that are responding. """ responders = set() for server in self.servers: client = Client_([server]) key = uuid4().hex client.set(key, 1) if client.get(key) == 1: responders.add(server) return responders