Preloading is a restart, not a cache warm

Preloaded files are compiled once at server start and are fixed until php-fpm restarts, which makes a deploy a restart rather than a reload.

opcache.preload=/var/www/app/preload.php
opcache.preload_user=www-data

; preload.php
;   $map = require __DIR__ . '/vendor/composer/autoload_classmap.php';
;   foreach ($map as $file) { opcache_compile_file($file); }

A restart drops in-flight requests unless something drains the node first, which turns a one-line configuration change into a deployment design question. It also fails loudly at start on any file with an unresolvable dependency, so the preload script wants curating rather than pointing at everything — which is a good failure and is work. The measured gain on a framework application is real and in the low single digits.