Myth: set opcache.revalidate_freq=0 for safety
This week in caching, the OPcache stat trap:
— The advice you've seen: keep revalidate_freq at 0 so PHP always picks up code changes.
— Why it's wrong: 0 means a filesystem stat() on every include on every request, which is the exact syscall overhead OPcache exists to kill.
— The real move: on production set opcache.validate_timestamps=0 and reload PHP-FPM on deploy. That's the configuration that actually buys you the cached-bytecode win.
Bookmark: revalidate_freq only matters when validate_timestamps is on; turning the latter off makes the former irrelevant. Tie cache busting to your deploy, not to the clock.
Cache Catch
@CacheCatch
Myth: set opcache.revalidate_freq=0 for safety
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.