Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85253 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90991 invoked from network); 20 Mar 2015 00:40:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Mar 2015 00:40:54 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.177 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.177 mail-qc0-f177.google.com Received: from [209.85.216.177] ([209.85.216.177:35978] helo=mail-qc0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2F/C2-25408-59C6B055 for ; Thu, 19 Mar 2015 19:40:54 -0500 Received: by qcto4 with SMTP id o4so81754882qct.3 for ; Thu, 19 Mar 2015 17:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=3Txectpf18qlpUlVkQCL4c+qErMrx1zvVyBRHU4BZCE=; b=J//qWctnN+bkzTWtDbizO1tuol9s+SLxu2f78EKRNNKMBkSB3cGJs0soTr12CEepbn Fio5YcviSI8ot3/5XuhBKeKaHhwlDsL6bdH50RQuobIKnaYoXF6ILc3Hq8I/4r8mwNoK JLsekBKgjU6738bYwlj50qpNUx5T1EA/bIMRQ3NwkpP7ms93F2M1jayOIO/YScx1JWfd UO46qVgPT1PgZbjmJsfGnAK0+NaWv8o9ZvHW8VthI3mjBqr+T0A3BDdnKI14BTHTvGUD WB53zWZ0zCZtFREkvhl1k7KyEq7nvwLZBFnBQXRoQ5GhgOCS2xVXQ6ZMC+nhCrzpbc/P eeyg== MIME-Version: 1.0 X-Received: by 10.140.85.137 with SMTP id n9mr96114833qgd.17.1426812050636; Thu, 19 Mar 2015 17:40:50 -0700 (PDT) Received: by 10.96.39.195 with HTTP; Thu, 19 Mar 2015 17:40:50 -0700 (PDT) In-Reply-To: References: Date: Fri, 20 Mar 2015 11:40:50 +1100 Message-ID: To: Eric Stenson Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [Q] Does PHP have a negative cache for file stat operations? From: pierre.php@gmail.com (Pierre Joye) On Fri, Mar 20, 2015 at 7:26 AM, Eric Stenson 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