What you need to know about PHP opcode cache clearing
tl;dr: You need to execute the code that clears caches in the context you want to have them cleared.
I recently got a pull request for typo3 console that added a command to clear opcode caches. This command called the API TYPO3 provides in the command line context. Unfortunately clearing those caches is not that easy.
Calling that API only clears the caches of the currently running PHP process. When calling the clear caches code from command line, then only the opcode cache for the PHP process spawned from the command line for that particular user is flushed, NOT the cache for the PHP process that delivers your website.
Conclusion
Clearing PHP opcode caches heavily depends on your (hosting) environment and your workflow. We can recommend tools, to mitigate the issue during deployment, but we can never provide a generic fix for this specific infrastructure issue in our applications on runtime.
My advice would be: Upgrade to a fast enough PHP version (7.x) and your website will still be fast enough for small to medium range websites, or invest the time to fine tune your OPCache configuration and an (automated) deployment that takes care to properly clear the caches for larger scale websites.
In any case disable opcode caches during development!








