1

Is it possible to tell from inside of PHP whether a script was hit by opCache or no.

I know that I can find out some statistics from phpinfo() about the number of

  • Cache hits
  • Cache misses
  • Cached scripts
  • Cached keys

The problem is that this is just statistics. What I want is to do the following. When I run some script test.php from inside script it would tell me whether it was hit or missed by opCache. Is it possible to do so?

Salvador Dali
  • 214,103
  • 147
  • 703
  • 753
  • 1
    Quite a bit of info here http://stackoverflow.com/a/17304671/2518525 – Darren Apr 16 '14 at 04:44
  • @Darren thank you, but I already read a lot of docs about opCache, and this post as well. – Salvador Dali Apr 16 '14 at 04:47
  • 1
    @SalvadorDali, the answer is contained there - please go read the [`opcache_get_status` page in the manual](http://us2.php.net/manual/en/function.opcache-get-status.php). Look at the argument list in specific. – Charles Apr 16 '14 at 05:07

0 Answers0