1 | initial version |
From [the Python documentation)[https://docs.python.org/3/library/functools.html] :
@functools.cache(user_function)
Simple lightweight unbounded function cache. Sometimes called “memoize”.
Returns the same as lru_cache(maxsize=None)
, creating a thin wrapper around a dictionary lookup for the function arguments. Because it never needs to evict old values, this is smaller and faster than lru_cache()
with a size limit.
HTH,
2 | No.2 Revision |
From [the the Python documentation)[https://docs.python.org/3/library/functools.html] documentation :
@functools.cache(user_function)
Simple lightweight unbounded function cache. Sometimes called “memoize”.
Returns the same as lru_cache(maxsize=None)
, creating a thin wrapper around a dictionary lookup for the function arguments. Because it never needs to evict old values, this is smaller and faster than lru_cache()
with a size limit.
HTH,