Free Control Panel for Zend Optimizer+ Opcache
In celebration of Zend open-sourcing their Optimizer Plus opcache for PHP, I whipped up a quick’n'dirty control panel just now. There doesn’t seem to be any other one? I wanted to learn and review its behavior a little more closely, to compare it to APC, Xcache and eAccelerator opcode caches.
(update: Version 0.0.4 now adds file grouping / sorting )
Code is a bit nasty in this early version because I did it in an hour. There is only limited info available about the cache state and I am still learning some of its caveats like it doesn’t actually store the file cached time but the file’s physical timestamp (probably to just see if the file has changed so it can recache it).
No sorting or anything fancy yet (what do you want in only an hour?)
and unless someone improves the zend extension itself there is no way to delete individual files.
In fact the cache clearing is nasty in itself, it seems they simply just completely restart the cache code, not just empty the memory. It literally halts and restarts.
I am thinking it might be possible to disable file stat with a very long revalidate_freq setting (or 0 ?) and then maybe create a “stat once” button by using ini_set to temporarily change revalidate_freq to ’1′ and then change it back to a very large number or zero.