[issue11802] filecmp.cmp needs a documented way to clear cache
report at bugs.python.org
Mon Jun 6 21:59:27 CEST 2011
Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:
Nadeem, I want to review this but won't have a chance to do it right away. Offhand, it seems like we could use the existing functools.lru_cache() for this if the stats were included as part of the key: cache[f1, f2, s1, s2]=outcome.
Also, I want to take a fresh look at the cache strategy (saving diffs of two files vs saving file contents individually) and think about whether than makes any sense at all for real world use cases (is there a common need to compare the same file pairs over and over again or is the typical use the comparison of many different file pairs). There may even be a better way to approach the underlying problem using hashes of entire files (md5, sha1, etc).
assignee: nadeem.vawda -> rhettinger
resolution: -> later
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list