The first time PHP executes a script, it compiles the source into bytecode (opcodes) and writes it to shared memory. All subsequent requests — even from different worker processes — read the pre-compiled bytecode directly, bypassing the lexer, parser, and compiler entirely.
opcache.enable = 1 — enables the extension (on by default in most distributions)opcache.memory_consumption = 128 — shared memory size in MB; use 256+ for large projectsopcache.max_accelerated_files = 10000 — maximum number of files in the cacheopcache.validate_timestamps = 0 — disables file modification checks; essential for production, yields the biggest speed boostopcache.revalidate_freq = 60 — when validate_timestamps = 1, recheck files every N secondsIn production with validate_timestamps = 0, OPcache is unaware of file changes. After a deploy you must flush it manually. The cleanest approach is restarting PHP-FPM. When that is not an option, call opcache_reset() or opcache_invalidate($path, true) from a post-deploy script.