Message232603
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. |
|
Date |
User |
Action |
Args |
2014-12-13 11:24:50 | ConnyOnny | set | recipients:
+ ConnyOnny, rhettinger, ncoghlan, r.david.murray, ethan.furman, josh.r |
2014-12-13 11:24:50 | ConnyOnny | set | messageid: <1418469890.47.0.697918243731.issue23030@psf.upfronthosting.co.za> |
2014-12-13 11:24:50 | ConnyOnny | link | issue23030 messages |
2014-12-13 11:24:50 | ConnyOnny | create | |
|