Sounds a bit hackish - as opposed to most things in php that have a special function.

V

Andi Gutmans wrote:

I don't know if I'd like to make a PHP user-land function for this, especially as it'll get slightly sticky due to this being a TSRM mechanism. Also, as mentioned by Elfyn, it's very unlikely to affect anyone.
How about allowing ini_set("realpath_catch_size", ?); during execution. It would change the cache size and while doing that would reset the cache?
I think that might be a good solution.


Andi

At 11:52 AM 9/22/2004 +0200, Christian Schneider wrote:

Sara Golemon wrote:

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



-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to