Re: Adding a way to disable the stat cache

From: Date: Mon, 06 Sep 2021 14:46:12 +0000
Subject: Re: Adding a way to disable the stat cache
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14  Groups: php.internals 
Request: Send a blank email to internals+get-115964@lists.php.net to get a copy of this message
On Mon, Sep 6, 2021 at 7:05 PM Christoph M. Becker <cmbecker69@gmx.de> wrote: > > On 06.09.2021 at 14:00, Pierre Joye wrote: > > > On Mon, Sep 6, 2021, 6:14 PM Benjamin Eberlei <kontakt@beberlei.de> wrote: > > > >> On Fri, Sep 3, 2021 at 11:51 PM Hans Henrik Bergan <divinity76@gmail.com> > >> wrote: > >> > >> The stat cache does not necessarily solve this issues though, only in very > >> limited cases where you work with the *same* file over and over again. The > >> stat cache only ever has exactly one entry, the *last* file that was > >> accessed. So if you work with many diferent files the stat cache does not > >> do what you would expect, to store the information of all these files. It > >> overwrites the cache with a new file entry when its not the same file as > >> currently stored. > > > > that is what happened in TS mode. For every part of a path, every single > > time a path is used (like source files in a common root path). I did not > > check it lately but I suppose it still does it. > > This is the realpath cache, though. realpath(path, 1) does not do stat anymore? I mean with virtual_file_ex and co? Not so important, too long since I touched this :) Also as someone mentioned here afterwards, instead of removing it straight away, I would go with the flag first, less risky :) best, -- Pierre @pierrejoye | http://www.libgd.org

« previous php.internals (#115964) next »