Disabling the timestamp check removes a stat call per file per request and means the cache no longer notices that files changed.
opcache.validate_timestamps=0
opcache.memory_consumption=256
opcache.max_accelerated_files=20000
; and the deploy must now do one of:
; reload php-fpm (a new master, briefly two versions)
; opcache_reset() (all workers, one instant)
; cachetool, over the fpm socket
A deploy that swaps a symlink and does nothing else leaves workers serving the previous release indefinitely, which presents as a deploy that appears not to have happened. The symlink case has a second subtlety: opcache keys on the resolved path, so a release directory with a new name is a cache miss rather than a stale hit — which works and doubles the memory until the old entries are evicted. max_accelerated_files being too low silently evicts and is worth checking against the real file count.