You absolutely want to avoid Opcache to restart with an empty cache.
The algorithm that detects whether opcache is "full" is depends on an unintuitive interaction between three different INI settings and is currently not documented.
For a dynamic language such as PHP, a byte-code cache can increase the performance significantly, because it guarantees a script is compiled only once.
A Word of Warning: This post repeatedly mentions monitoring stats with .
Because Opcache uses a unique pool of shared memory for every SAPI, you cannot access the webservers statistics from the console. Opcache uses 64 MB of RAM to save the compiled PHP scripts by default and up to 3907 php scripts.
PHP code that pulls in outside information, where the caching would prevent the most recent information from being displayed.
Since PHP 5.5 the Opcache extension is part of the core and adds support for byte-code caching of PHP scripts.
This sounds more than enough to store your PHP application scripts, but there are caveats: When Opcache is "full" under some circumstances it will wipe all cache entries and start over from an empty cache.
When this happens and your server gets large amounts of traffic, this can cause a thundering herd problem or cache slam: lots of requests simoultaneously generating the same cache entries.
It helped to dig through the C code to understand it.
The three relevant ini variables are defined as follows: use an eviction strategy such as Least Recently Used (LRU).
To prevent a page from ever being cached, use the NOCACHE tag anywhere in the document.