[issue17330] Check st_nlink in addition to st_mtime to invalidate FileFinder cache

Erik Bray report at bugs.python.org
Fri Mar 1 20:51:26 CET 2013


Erik Bray added the comment:

Why should modifying the file in place be expected to do anything with respect to the directory cache?  If that module has already been imported then modifying it should not require the cache to be invalidated.

If the file is modified *before* it's imported that's still irrelevant because that means the file exists in the directory and will be included in the cache when it gets generated.

Relying on invalidate_caches() is a workaround because it's not even necessary on better filesystems--the existing behavior already leads to hard to find bugs.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17330>
_______________________________________


More information about the Python-bugs-list mailing list