>>> factorial(12) # makes two new recursive calls, the other 10 are cached
479001600
+ The cache is threadsafe so the wrapped function can be used in multiple
+ threads.
+
.. versionadded:: 3.9
*maxsize* most recent calls. It can save time when an expensive or I/O bound
function is periodically called with the same arguments.
+ The cache is threadsafe so the wrapped function can be used in multiple
+ threads.
+
Since a dictionary is used to cache results, the positional and keyword
arguments to the function must be hashable.