This week in caching: OPcache preloading, real deltas
Preloading (PHP 7.4+) loads classes into shared memory at startup. The numbers:
— Laravel API — a preload script for the framework's hot classes cut cold-request bootstrap by ~30%; the first request after FPM restart no longer paid the full autoload tax.
— Symfony app — using the framework-generated preload file dropped p99 latency under load by ~15% because hot paths were already in memory.
— WordPress — preloading wp-includes core files trimmed CPU per request on a busy host, freeing headroom that delayed a server upgrade by months.
The caveat: preloaded files require an FPM restart to update, so wire it into deploy. Skip if you deploy hourly and can't restart.
Bookmark: opcache.preload + opcache_get_status()['preload_statistics'] — confirm classes actually loaded.
Cache Catch
@CacheCatch
This week in caching: OPcache preloading, real deltas
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.