Can I use apc opcode cache if I can (not must) have unique content for each visitor on same page? I'm not sure I understand how opcode working. If only save php result to cache and serving it like "html", then it's useless for me. I definitely need to run sql queries on each pageview. Or it's any better way how to optimize php? App have very high-load - about 1000 pageviews per second. It run on nginx + php-fpm.
OPcache is a caching engine built into PHP. When enabled, it dramatically increases the performance of websites that utilize PHP. From php.net: OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request.
An OPCode is the numeric identifier of a single operation that can be performed by the Zend Virtual Machine (Zend VM). After PHP has scanned the human-readable source code and chunked it into tokens, these tokens are grouped together in the parsing phase.
Purge OpCache will allow you to clear OpCache on post/page updates. If you need this integration, you can enable it, but it does not affect performance.
Yes, you can. APC caches the program, not its' result. So, the code will be executed each time, just in "optimised" way.
How to determine which resource object loaded from, cached opcodes or compiled newly?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With