All destructive FilePath operations should clear the stat cache.

[email protected] Tue, 24 Nov 2009 00:40:50 -0000
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from glyph <[email protected]>:

In the spirit of #2896, ''all'' destructive operations on `FilePath` should really be clearing the stat cache.  While most creation/destruction methods effectively do that now, consider:
{{{
>>> from twisted.python.filepath import FilePath
>>> fp = FilePath("hello")
>>> fp.touch()
>>> fp.getmtime()
1259023038
>>> import time
>>> time.sleep(10)
>>> fp.touch()
>>> fp.getmtime()
1259023038
}}}

This is true of `getsize()` and a few other things as well.  Any operation which potentially changes a file should un-cache its stat results.

----------
Type     : enhancement
Component: core
Keywords : 
Priority : normal
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/4129