forked from VimPlug/jedi
check for expired time caches in every interaction
This commit is contained in:
@@ -18,7 +18,12 @@ def clear_caches():
|
|||||||
for m in memoize_caches:
|
for m in memoize_caches:
|
||||||
m.clear()
|
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):
|
def memoize_default(default=None, cache=memoize_caches):
|
||||||
|
|||||||
Reference in New Issue
Block a user