Hi, I have just reported #72666 (touch() works differently on plain paths and file:// paths with regards to cleaning the stat cache) and I would gladly provide a PR with a fix and unit tests. However, before I start working on this (well - it would be an easy fix), I would like to question whether the stat cache is a good idea and whether it's still (or ever was) needed these days.
File systems right now are really good at quickly providing the information: On MacOS I measure only 10% loss in performance when doing nothing but calling stat() and clearstatcache() compared to just calling stat(). Over NFS on Linux, it's 20%. Additionally, I wonder what the stat cache is actually helpful for - as far as I understand it, this only helps if you repeatedly call stat() (or a related function) on the same file within the same request which probably isn't very common application behaviour to begin with. As such, before I fix touch() to call php_clear_stat_cache(), maybe it's worth reconsidering the whole thing and removing it from PHP itself at least for later versions, though I guess there I would be in firm RFC territory which I'd be willing to write if I had RFC writing credentials. What do you think? Philip -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php