Summary: ftpfs caching behavior seems mostly undesirable. This patch eliminates caching by default and allows the previous behavior to be restored with a -h flag. Details: the ftpfs manpage currently states "Ftpfs caches files and directories. A directory will fall from the cache after 5 quiescent minutes or if the local user changes the directory by writing or removing a file." - but I believe this is not accurate. According to my testing, there is no time-based directory cache expiry. The ftpfs.h file does define an ISOLD macro that would fit the manpage, but a grep reveals that the ISOLD macro is never used anywhere in the current code. The cache can be cleared by using the special .flush.ftpfs directory entry. Right now, the 9gridchan public grid is using ftpd/ftpfs to store files with more rapid upload/download than are available from the 9p ramfs service. Clients also transmit messages via a shared plumber to cause other connected users to view images and documents. The current ftpfs behavior clashes badly with this mode of usage - someone uploads a file, and no one else can see it and it cannot be plumbed until/unless clients and the plumber hit the .flush.ftpfs. Given modern networks and machines, the caching seems unnecessary even in usage situations other than the public grid. From looking at the code, the only complication I see might be the the way the caching is used to create synthetic top directories for the VM and VMS operating systems in proto.c. The patch is implemented crudely by finding all the uses of the ISCACHED macro in the code and making them conditional on the -h docache flag. This leaves the calls to uncache() and uncachedir() unchanged but I don't believe this has any negative consequences. The patch has been only lightly tested and seems to do the trick as desired, but I haven't studied the code or tested extensively enough to guarantee that there aren't any other side effects. If people think the current behavior should remain the default, with the flag being used to turn off caching, that seems just as good to me and the patch could remain the same except flipping the polarity of the tests and changing the var name from 'docache' to 'nocache' and changing my edit to the manpage to reflect this. In general ftpfs is a crufty relic of an earlier era, but we are getting some use from it on the public grid, so I thought I'd put this forward. -mycroftiv