문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top