From 6559c38b51c28245cdbb06641466defac607855b Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 18 Dec 2013 22:36:20 -0400 Subject: Do not memoize get_key, but a separate method. In this way we can choose which calls to get from cache and we do not mess with the call from send_key --- keymanager/src/leap/keymanager/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/keymanager/src/leap/keymanager/__init__.py b/keymanager/src/leap/keymanager/__init__.py index 5b1d8d9..aa4e2e7 100644 --- a/keymanager/src/leap/keymanager/__init__.py +++ b/keymanager/src/leap/keymanager/__init__.py @@ -252,6 +252,12 @@ class KeyManager(object): signal(proto.KEYMANAGER_DONE_UPLOADING_KEYS, self._address) @memoized_method + def get_key_from_cache(self, *args, **kwargs): + """ + Public interface to `get_key`, that is memoized. + """ + return self.get_key(*args, **kwargs) + def get_key(self, address, ktype, private=False, fetch_remote=True): """ Return a key of type C{ktype} bound to C{address}. -- cgit v1.2.3