Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:12932 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24058 invoked by uid 1010); 22 Sep 2004 09:52:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 23686 invoked from network); 22 Sep 2004 09:52:48 -0000 Received: from unknown (HELO xaxa.search.ch) (195.141.85.117) by pb1.pair.com with SMTP; 22 Sep 2004 09:52:48 -0000 Received: from localhost (localhost [127.0.0.1]) by xaxa.search.ch (Postfix) with ESMTP id 2823A6D8D9; Wed, 22 Sep 2004 11:52:47 +0200 (CEST) Received: by xaxa.search.ch (Postfix, from userid 65534) id 51B156D8DB; Wed, 22 Sep 2004 11:52:44 +0200 (CEST) Received: from [192.168.1.72] (ultrafilter-i [192.168.85.2]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by xaxa.search.ch (Postfix) with ESMTP id 000F96D8D4; Wed, 22 Sep 2004 11:52:41 +0200 (CEST) Message-ID: <41514B69.6040102@cschneid.com> Date: Wed, 22 Sep 2004 11:52:41 +0200 User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sara Golemon Cc: internals@lists.php.net References: <5.1.0.14.2.20040920182416.04a8cdd0@localhost> <5.1.0.14.2.20040921115703.02d197a0@localhost> <20040921230954.79781.qmail@pb1.pair.com> In-Reply-To: <20040921230954.79781.qmail@pb1.pair.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on xaxa.search.ch X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.64 X-Virus-Scanned: by AMaViS 0.3.12pre8 Subject: Re: [PHP-DEV] realpath() caching From: cschneid@cschneid.com (Christian Schneider) 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