Re: file functions and clearstatcache

From: Date: Tue, 21 May 2002 18:15:47 +0000
Subject: Re: file functions and clearstatcache
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-98627@lists.php.net to get a copy of this message
On Tue, 21 May 2002, Gerard Samuel wrote: > I have a function that checks whether a file exists and loads it like so > > function foo($bar) > { > if (file_exists($bar)) > { > include($bar); > } > } > > According to clearstat cache, its use is for files that change often. > In my case the files are static, > so I wanted to be clear, as to whether I should/shouldn't be using > clearstatcache() in my sudo function?? You don't need it unless you expect the file will have changed during a single execution of your PHP program (i.e., the .000001sec - 30sec that it takes to run). This does not sound like anything you need to worry about. miguel

« previous php.general (#98627) next »