====== OPcache ======
Source: [[https://www.arubacloud.com/tutorial/how-to-install-and-configure-php-opcache-on-ubuntu-18-04.aspx|How to install and configure PHP OPcache on Ubuntu 18.04]]
===== Apache =====
Éditer le fichier **php.ini** :
sudo vi /etc/php/7.4/apache2/php.ini
Éditer les valeurs suivantes :
[opcache]
opcache.enable=1
opcache.memory_consumption=128
Redémarrer Apache :
sudo systemctl restart apache2.service
Vérification à l'aide de **phpinfo** :
{{:php:screenshot_20211119_082952.png|}}
===== Ligne de commande et Serveur Local =====
C'est la même chose, mais le fichier **php.ini** est différent :
sudo vi /etc/php/7.4/cli/php.ini