memoize: Start reading from new memoize cache pool.

This commit is contained in:
Neil Williams
2013-06-16 19:35:57 -07:00
parent b5c57aa7ed
commit 501ea33f0f

View File

@@ -42,7 +42,7 @@ def memoize(iden, time = 0, stale=False, timeout=30):
key = make_key(iden, *a, **kw)
res = None if update else cache.get(key, stale=stale)
res = None if update else memoizecache.get(key, stale=stale)
if res is None:
# not cached, we should calculate it.
@@ -51,7 +51,7 @@ def memoize(iden, time = 0, stale=False, timeout=30):
# see if it was completed while we were waiting
# for the lock
stored = None if update else cache.get(key)
stored = None if update else memoizecache.get(key)
if stored is not None:
# it was calculated while we were waiting
res = stored