forked from VimPlug/jedi
add delete option to cache deleter
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user