[Python-ideas] Clear all caches
Skip Montanaro
skip.montanaro at gmail.com
Wed Apr 1 17:45:52 CEST 2015
On Wed, Apr 1, 2015 at 10:35 AM, Guido van Rossum <guido at 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
More information about the Python-ideas
mailing list