I am planning to use the php5-apcu ubuntu package.
Is the data shared between processes? In other words, if I set a cache entry in one website load, will another website load have the cache entry available, even if it is served with another process?
How does this work for:
https://github.com/krakjoe/apcu/issues/121
The rule is that only child processes can access what their parent created; In FCGI spawned processes are not necessarily a child of their parent, they may not be actual forks. If your process manager works like conventional FCGI/CGI then you will not be able to share, if it works like FPM, and initializes PHP in a parent and forks child interpreters then you will have no problem.
Apache's prefork and PHP's FPM will share between worker processes (via the parent's memory space).
The CLI will not, as each CLI invocation is a separate process.
You might consider something like memcached or redis as an alternative.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With