[issue9396] Standardise (and publish?) cache handling in standard library

Nick Coghlan report at bugs.python.org
Mon Aug 9 07:51:04 CEST 2010


Nick Coghlan <ncoghlan at gmail.com> added the comment:

On Mon, Aug 9, 2010 at 3:11 PM, Raymond Hettinger
<report at bugs.python.org> wrote:
> ISTM, we should just provide basic caching with reasonable space consumption (i.e. not huge) that gives improvements to common use cases (like I've done with the fnmatch and re module) and let programmers with unusual cases add their own caching options rather that be tied into our choice of lru vs lfu or whatnot.

A very good point! Perhaps we should note that somewhere? I'm not sure
where though, unless we just mention it in the docs for the relevant
modules..

Going the other way (using a smaller, or no, cache), perhaps in
addition to the new hit/miss attributes, the cache decorators should
expose the original function to allow the cache to be bypassed?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9396>
_______________________________________


More information about the Python-bugs-list mailing list