mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-29 00:38:11 -05:00
memoize: Start reading from new memoize cache pool.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user