mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
utils: added a function to reset memoized cache
Added a function to reset the memo cache used by memoized decorator, which would force all memoized functions to re-evalued their results when they are next called. This is primarily intended for debugging.
This commit is contained in:
parent
0e8fc0d732
commit
d7aac2b5df
@ -537,6 +537,10 @@ def mask_to_list(mask):
|
||||
__memo_cache = {}
|
||||
|
||||
|
||||
def reset_memo_cache():
|
||||
__memo_cache.clear()
|
||||
|
||||
|
||||
@wrapt.decorator
|
||||
def memoized(wrapped, instance, args, kwargs):
|
||||
"""A decorator for memoizing functions and methods."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user