codeguy / php-the-right-way

An easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative tutorials around the Web
https://www.phptherightway.com
Other
9.05k stars 3.25k forks source link

The statement about non-shared APCu data between FastCGI workers is confusing #1009

Closed andrew-demb closed 6 days ago

andrew-demb commented 3 months ago

I think the statement

Note that when running PHP as a (Fast-)CGI application inside your webserver, every PHP process will have its own cache, i.e. APCu data is not shared between your worker processes

is confusing - because the most popular (Fast-)CGI implementation - php-fpm shares cache between worker processes (as of https://github.com/krakjoe/apcu/issues/121).

There is a difference between using fpm and using fcgi, I should probably put in a PR to phptherightway to clear it up.

Originally posted by @andrew-demb in https://github.com/codeguy/php-the-right-way/issues/299#issuecomment-2183160006

PowerKiKi commented 1 week ago

I created #1011 to try and clarify the situation.