changeset 2:d78e7eba3f8b

Use memoize instead of cache for simple function
author Cédric Krier <ced@b2ck.com>
date Sat, 21 Feb 2015 19:25:05 +0100
parents ac34601b8b6b
children 1bd78eb130e3
files farmhouse.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/farmhouse.py	Sat Feb 21 19:24:31 2015 +0100
+++ b/farmhouse.py	Sat Feb 21 19:25:05 2015 +0100
@@ -74,12 +74,12 @@
     return map(str.strip, packages.split(','))
 
 
-@cache.cached(timeout=2 * 60 * 60, key_prefix='versions')
+@cache.memoize(timeout=2 * 60 * 60)
 def get_versions(name):
     return client.package_releases(name)
 
 
-@cache.cached(timeout=24 * 60 * 60, key_prefix='urls')
+@cache.memoize(timeout=24 * 60 * 60)
 def get_urls(name, version):
     return client.release_urls(name, version)