All the solutions I managed to find are only on lru_cache
. But in my case dir(functools)
shows that that very lru_cache
does reside in functools
while cache
does not! How can I solve this?
The documentation for functools.cache
states that it's only available from Python 3.9 onwards. If you're using an earlier version then the documentation also states that it's the same as using lru_cache(maxsize=None)
, so that's probably your best option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With