Domanda

What criteria is used to determine whether a cache hit has occurred in PHP OPcache? I would think that things like the request URL, headers, etc. would affect whether a hit occurs or not, but how does OPcache deal with things like pages/scripts that rely on cookies/sessions for rendering the page?

È stato utile?

Soluzione

You're confusing PHP Opcache with an HTTP cache.

PHP Opcache doesn't cache the output of a PHP page. Instead, it caches the internal representation used by PHP for a PHP source file, allowing it to be executed immediately when needed, rather than requiring PHP to reparse source files every time a page is requested.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top