mirror of
https://github.com/davidhalter/jedi.git
synced 2026-03-07 07:51:52 +08:00
@@ -123,6 +123,8 @@ def time_cache(seconds):
|
|||||||
result = func(*args, **kwargs)
|
result = func(*args, **kwargs)
|
||||||
cache[key] = time.time(), result
|
cache[key] = time.time(), result
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
wrapper.clear_cache = lambda: cache.clear()
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
return decorator
|
return decorator
|
||||||
|
|||||||
Reference in New Issue
Block a user