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.
How APC opcode cache works
Yes, you can. APC caches the program, not its' result. So, the code will be executed each time, just in "optimised" way.
Thanks for easy and fast explanation :) And if I upload new version of php and old is in cache - apc load old code for TTL time or check file for new version? –
Dorren
By default, APC checks if file has been updated on every request. Please read a short description php.net/manual/en/apc.configuration.php#ini.apc.stat –
Rensselaerite
How to determine which resource object loaded from, cached opcodes or compiled newly?
© 2022 - 2024 — McMap. All rights reserved.
PHP
withAPC
on a single server handling 5k -10k rps with no issues and server load almost .25 That's withmysql
reads/writes and a few .ini and .dat files with no issues. Only a 4 core server with 8gb ram. It's all about the tuning :) – Framing