Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:12933 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89810 invoked by uid 1010); 22 Sep 2004 11:01:21 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 89647 invoked from network); 22 Sep 2004 11:01:19 -0000 Received: from unknown (HELO anchor-post-37.mail.demon.net) (194.217.242.86) by pb1.pair.com with SMTP; 22 Sep 2004 11:01:19 -0000 Received: from elfyn.demon.co.uk ([158.152.33.32]) by anchor-post-37.mail.demon.net with esmtp (Exim 3.35 #1) id 1CA4s7-000Axy-0b; Wed, 22 Sep 2004 11:01:16 +0000 Received: from beu by elfyn.demon.co.uk with local (Exim 4.41) id 1CA4sH-0005x5-Fv; Wed, 22 Sep 2004 12:01:25 +0100 To: php-internals@lists.php.net Date: Wed, 22 Sep 2004 12:01:23 +0100 User-Agent: KMail/1.6.2 Cc: Christian Schneider , Sara Golemon , internals@lists.php.net References: <5.1.0.14.2.20040920182416.04a8cdd0@localhost> <20040921230954.79781.qmail@pb1.pair.com> <41514B69.6040102@cschneid.com> In-Reply-To: <41514B69.6040102@cschneid.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-ID: <200409221201.25458.beu@gnu.org> Sender: "Elfyn McBratney " Subject: Re: [PHP-DEV] realpath() caching From: beu@gnu.org (Elfyn McBratney) =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, Btw, cool patch. :-) I'll see if we can start testing this in an experimen= tal=20 ebuild in Gentoo land. On Wednesday 22 Sep 2004 10:52, 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 t= he > > 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. In real life, that would only mean a 'broken' path for 1 second. And chang= ing=20 path's on a production system doesn't happen all that regularly, in my=20 experience. On busy sites, a lot of users could get that broken file (not exist,=20 whatever), but if you don't code realpath() file i/o related correctly i.e.= ,=20 checking the file open'ed ok at least, (and in the stat()/is_*() case)=20 checking the file size, you're toast anyway. ;-) > 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. Same here, if it counts. ;-) For those short-by-1-second cases, and during= =20 development, t'would be handy. Elfyn =2D --=20 Elfyn McBratney beu on irc.freenode.net/savannah.[non]gnu.org PGP Key ID: 0x456548B4 PGP Key Fingerprint: 29D5 91BB 8748 7CC9 650F 31FE 6888 0C2A 4565 48B4 =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBUVuDaIgMKkVlSLQRAvhiAJ9IGQtNBi1T+XNIddkEbxWblgrfAACfXeGr sbhCUYI5tascMi95g9Is+ug=3D =3Dz+yd =2D----END PGP SIGNATURE-----