[Python-ideas] Clear all caches

Andrew Barnert abarnert at yahoo.com
Wed Apr 1 17:32:41 CEST 2015


On Apr 1, 2015, at 08:18, Eric Snow <ericsnowcurrently at gmail.com> wrote:
> 
> On Wed, Apr 1, 2015 at 8:37 AM, Andrew Barnert
> <abarnert at yahoo.com.dmarc.invalid> wrote:
>> Anyway, why do you want this? Is there some cache that's using too much memory in an app of yours? Or is it more about getting a semi-clean start on the interactive interpreter? Or something different?
> 
> Presumably http://bugs.python.org/issue23839.

Ah, for running a large test suite (like the stdlib's). That makes sense.

From the initial report ("in particular linecache") it seems at least possible that there's really just one cache that's a real issue, in which case there's a pretty obvious fix. (And making it possible to use linecache in a bounded way, instead of all-or-nothing clearing, might be useful for other purposes besides this...) But I don't know if that really is the case; did anyone check whether the 500MB were 90%+ in linecache or anything like that?


More information about the Python-ideas mailing list