Unbounded lru_cache growth in TheAlgorithms Python memoized DP examples
TheAlgorithms/Python uses functools.lru_cache (or functools.cache on Python 3.9+) to memoize recursive dynamic-programming implementations such as Fibonacci, knapsack, and coin-change variants. Many of these decorators are applied without a maxsize , so every distinct argument tuple is retained for the lifetime of the process. My goal is to reuse one of thes