If you want to flush OPcache the possible best way is using a tool on your code to connect to the OPcache service and clean it.
As this operation is something that you cannot do immediately from the Acquia Cloud UI, we advise you to install the opcache gui published on the github repository below:
As the developers said, the opache-guis is a clean and responsive interface for Zend OPcache information, showing statistics, settings and cached files, and providing a real-time update for the information. This interface uses ReactJS and Axios and is for modern browsers and requires a minimum of PHP 7.1.
Steps to install it:
- Download the code directly to the docroot.
- Add it on you repository on your local machine by running the following command:
wget https://raw.githubusercontent.com/amnuts/opcache-gui/master/index.php -O opcache-gui.php
- Commit the changes on your code and deploy it to have the tools on your environment.
- Visit the URL [yourdomain.com]/opcache-gui.php
You will see a page like this:
As you can see, there is a option to clear cache