1 parent
b4a4dacebd
commit
48b137a7f5
1 file changed
+2
@@ -123,6 +123,8 @@ def time_cache(seconds):
|
||||
result = func(*args, **kwargs)
|
||||
cache[key] = time.time(), result
|
||||
return result
|
||||
|
||||
wrapper.clear_cache = lambda: cache.clear()
|
||||
return wrapper
|
||||
|
||||
return decorator
|
||||
|
||||
Reference in new issue
Block a user