Constantin added the comment:

It may be the case, that an lru_cache does not provide the best strategy for 
reliably caching many base cases in recursively written code. I suggest that 
someday we think about a different caching paradigm which fits this purpose and 
add it to functools e.g. as functools.recopt_cache. This cache would then 
implement the same interface as lru_cache and therefore all code currently 
using lru_cache could benefit from recopt_cache with just one line of code 
change.

Furthermore, by designing this interface, it becomes more probable that user 
defined caching decorators are compatible.

Please remember: My suggestion isn't just about lru_cache, but about an 
interface for caching decorators.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23030>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to