Open Starraider opened 3 months ago
Hang on-- actually that should already happen; at least, there's a mittwald:opcache:flush
task that should run after the deploy:symlink
stage:
Implementation-wise, that task uses cachetool to flush the OPcache via a shell command:
Could you check if the mittwald:opcache:flush
task runs on your deployment? If it does, alternatively the implementation might be flawed and cachetool doesn't flush the OPCache correctly in your case... 🤔
https://github.com/mittwald/deployer-recipes/blob/master/src/Recipes/AppRecipe.php#L217
opcache:invalidate:scripts
does not work as one would expect. It does pick up files from older release folders but ignores the ones from the most current release folder. Thus resulting in still serving outdated php files.
It has happened to me several times that the changes I made to my code were not visible after deployment to the SpaceServer. The first time this happened to me, after hours of unsuccessful searching for the error, I contacted Mittwald support, who then explained to me that it can happen that you have to clear the OPcache manually (by executing "touch ~/.config/php/php.ini"). Today I wasted another 20 minutes trying to figure out why my code wasn't working on the SpaceServer, until I remembered that I had forgotten to manually clear the OPcache again after deployment.
It's just super annoying and takes a ton of time, if you have to clear the OPcache manually after every deployment!!
That's why I would really like your deployer-recipes to include a function that automatically clears the OPcache after each successful deployment!
It would be great if you could add this feature!