1
0
forked from VimPlug/jedi

check for expired time caches in every interaction

This commit is contained in:
David Halter
2012-12-22 01:35:25 +01:00
parent 0617909e84
commit 2610c180c0

View File

@@ -18,7 +18,12 @@ def clear_caches():
for m in memoize_caches:
m.clear()
time_caches = []
for tc in time_caches:
# check time_cache for expired entries
for key, (t, value) in list(tc.items()):
if t < time.time():
# delete expired entries
del tc[key]
def memoize_default(default=None, cache=memoize_caches):