Difference between functool’s cache and lru_cache
functools.cache was newly added in version 3.9. The documentation states: 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. Example … Read more