The code cache (OPcache) caches the page’s PHP code, which makes most page loads significantly faster.
How do I enable the code cache?
This cache is currently enabled by default and should work without any changes to the page.
How long does the code cache remain?
The cache remains until the file is edited. A few seconds later, the updated file will be used and saved for the future in the cache if there is space left.
How is the code cache cleared?
Each page has a certain amount of memory on the web server to use for its code cache. When this memory is filled with cached files, no additional files will be cached until the cache is cleared. This cleanup is done automatically from time to time by the server, but can also be done manually with the PHP function “opcache_reset”.
How do I use the code cache with WordPress?
To use code cache with WordPress, nothing needs to be done. If you want to be able to see statistics about the code cache and easily clear the cache manually, we can recommend the plugin “WP OPcache” (https://wordpress.org/plugins/flush-opcache/).