I have setup the PHP APCu caching on my Ubuntu machine. But the problem is that cached data is clearing on every time restarting apache. How can i resolve this issue?
Asked
Active
Viewed 820 times
1
-
I don't think it's possible. PHP runs as an apache process, when it's stopped, it will clear the APC as well. – Nimeshka Srimal Jul 12 '18 at 16:00
1 Answers
0
Since PHP run as apache process you cannot do it so easly. But you can use php-fpm with apache and then they will be two independent processes. You will only need to install php-fpm, run in and in apache vhost configuration put:
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/path/to/your/documentroot/$1
DirectoryIndex /index.php index.php
More information on configuring apache with php-fpm can be found here

Karol Samborski
- 2,757
- 1
- 11
- 18