Re: [Q] Does PHP have a negative cache for file stat operations?

From: Date: Fri, 20 Mar 2015 00:40:50 +0000
Subject: Re: [Q] Does PHP have a negative cache for file stat operations?
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-85253@lists.php.net to get a copy of this message
On Fri, Mar 20, 2015 at 7:26 AM, Eric Stenson <ericsten@microsoft.com> wrote: > PHP Internals folks-- > > We're doing some performance work in WinCache, and we're finding that some frameworks > are...uh...enthusiastically using file_exists(), is_file() and is_dir() functions on > files/directories that don't exist. Every. Single. Pageload. > > Does the PHP stat cache include negative cache entries? If not, why not? > > Are there any existing extensions that implement a negative cache for file_exists(), is_file(), > et. al.? I suppose you mean to cache what does not exist? I think it is somehow done, indirectly or this info could be detected using the stat cache and the resolved path cache. However it may make this part of the cache implementation a bit more trickier but it should be possible. Cheers, -- Pierre @pierrejoye | http://www.libgd.org

« previous php.internals (#85253) next »