Re: realpath() caching
| From: | Andi Gutmans | Date: | Sat, 25 Sep 2004 03:35:19 +0000 |
| Subject: | Re: realpath() caching | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-12975@lists.php.net to get a copy of this message | ||
Yep, that was my thinking.
Andi
At 08:29 PM 9/24/2004 +0200, Marcus Boerger wrote:
Hello Andi, if we have ini_set("realpath_catch_size") then obviously ini_set("realpath_catch_size", 0) === clearstatcache() without any additional line of code. regards marcus Friday, September 24, 2004, 1:08:14 AM, you 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:seconds; ifSara Golemon wrote:realpath_cache_ttl - Time to live for cache entry (default 120back upset 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-- Best regards,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.phpMarcus mailto:helly@php.net