1
0
forked from VimPlug/jedi

add delete option to cache deleter

This commit is contained in:
David Halter
2013-01-08 12:41:08 +01:00
parent 869572fe64
commit da34fc2358

View File

@@ -9,7 +9,7 @@ time_caches = []
star_import_cache = {}
def clear_caches():
def clear_caches(delete_all=False):
""" Jedi caches many things, that should be completed after each completion
finishes.
"""
@@ -27,6 +27,11 @@ def clear_caches():
# delete expired entries
del tc[key]
if delete_all:
global time_caches
time_caches = []
star_import_cache.clear()
def memoize_default(default=None, cache=memoize_caches):
""" This is a typical memoization decorator, BUT there is one difference: