New submission from jeff deifik <j...@jeffunit.com>: I have a program which calls filecmp.cmp a lot. It runs out of memory. I read the source to filecmp, and then I periodically set filecmp._cache = {}
Without doing this, filecmp's cache uses up all the memory in the computer. There needs to be a documented interface to clear the cache. I suggest a function def clear_cache: _cache = {} Without a documented interface, there is no standard way to clear the cache. It is possible different versions of python will require different methods to clear the cache, which will reduce python code portability and is a bad idea. Alternatively, one might disable the caching code. One shouldn't have to look at the source code of a library function to see why it is consuming memory. ---------- messages: 133290 nosy: lopgok priority: normal severity: normal status: open title: filecmp.cmp needs a documented way to clear cache versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11802> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com