Re: Discussion: Remove file statcache?
| From: | Calvin Buckley | Date: | Sun, 22 Dec 2024 15:54:52 +0000 |
| Subject: | Re: Discussion: Remove file statcache? | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-126169@lists.php.net to get a copy of this message | ||
On Dec 22, 2024, at 10:57 AM, Kévin Dunglas <kevin@dunglas.fr> wrote:
>
> On Sun, Dec 22, 2024 at 10:44 AM Jakub Zelenka <bukka@php.net> wrote:
> Thinking about it, there might be a possibility to address it (at least on Linux) using
> fanotify. Not sure about other platforms but maybe there are some solutions to address it. Also it
> might get a bit complex and not sure how much the solution is viable.
>
> For FrankenPHP, we successfully use
> https://github.com/e-dant/watcher for this kind of usage. It
> supports Linux (fanotify, notify, epoll...), macOS, and Windows, and is very efficient.
> It's a C++ library but with pure C bindings.
>
> Best,
I think watching files makes sense for FrankenPHP's use case of
development server, but I can't imagine the overhead and
non-portability makes sense for the stat cache. I feel any gains you'd
have from stat cache would be offset by that. And it'd be unfortunately
the only way to actually solve the "external thing changes thing behind
the stat cache's back" problem.