summaryrefslogtreecommitdiff
path: root/src/leap/keymanager/__init__.py
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2014-09-16 10:55:16 -0500
committerRuben Pollan <meskio@sindominio.net>2014-09-16 12:56:49 -0500
commit4019e2fa65f81823fdcb0b81f022e00f168403dd (patch)
treebc181ddffb01821a187a7f44e04e0c789c1d8cf4 /src/leap/keymanager/__init__.py
parent539caa6c9a860d1be9ebc3295b258e9611efc3bf (diff)
Remove get_key_from_cache
We only need to cache the fetch with a sort timeout. The tests that fetches keys now have to use different keys or will be cached.
Diffstat (limited to 'src/leap/keymanager/__init__.py')
-rw-r--r--src/leap/keymanager/__init__.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/leap/keymanager/__init__.py b/src/leap/keymanager/__init__.py
index fe9f02cb..37eb2233 100644
--- a/src/leap/keymanager/__init__.py
+++ b/src/leap/keymanager/__init__.py
@@ -189,6 +189,7 @@ class KeyManager(object):
res.raise_for_status()
return res
+ @memoized_method(invalidation=300)
def _fetch_keys_from_server(self, address):
"""
Fetch keys bound to C{address} from nickserver and insert them in
@@ -249,13 +250,6 @@ class KeyManager(object):
self._put(uri, data)
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}.