realpath_cache_ttl - Time to live for cache entry (default 120 seconds; if set to 0 then doesn't refresh).
Ah, didn't grok the TTL at first glance.... that fairly well negates the need for an explicit flush.... If the FS layout needs to change all one would have to do is turn down the TTL, make the change, and turn it back up after the cache is sure to be cleared...
Hmm.. if I understand correctly then one can only turn it down to 1 second as 0 means unlimited. So if an application changes the tree it would have to sleep(1) for it to happen.
I'd strongly suggest that we have an explicit flush option. And no, I don't think restarting the server is an opton as this can't be done from inside an application.
BTW: This needs to be well documented as running into caching problems can cause a very annoying debugging sessions due to the Heisenbug nature. Happened to more than one person I know with filesize() with missing clearstatcache() calls. One of PHP's main feature is programmer efficiency so we should be careful to add optimizations which make things harder for programmers.
- Chris
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php