
On Wed, Apr 1, 2015 at 10:35 AM, Guido van Rossum guido@python.org wrote:
Actually several of these "caches" aren't caches at all -- deleting data from them will break APIs.
Then, like you say, they aren't caches. If we split them into two groups (fake and real), then the real caches (like linecache) would probably benefit with some actual cache-like trimming. The others should be fixed in some other way.
Will these problems only be evident during testing, or are there plausible scenarios where a real application could stress the system? Or could such unbounded registries/caches be potential vectors for DOS attacks?
A cache API still makes some sense to me, even if only to have available for application writers. I see that functools has an lru_cache decorator. Perhaps linecache could use it?
Skip