How to Check for Stale PHP OPcache After a Deployment
A deployment can update files while workers still execute a previous cached version. Confirm the reported code version and the actual PHP handler before changing cache settings.
Procedure
- Check the release path. Use a sanctioned health signal or logs to compare a request’s effective build with the expected deployment. Verify the current document root and any release symlinks.
- Read runtime settings privately. Use the approved panel or runtime diagnostics to inspect timestamp validation settings for the web process. Keep PHP information and private paths out of public endpoints.
- Control the experiment. On staging, reproduce the old behavior and use the host’s documented cache invalidation or worker reload. Do not introduce an unauthenticated cache-clearing endpoint.
- Retest across workers. Compare repeated requests and every relevant application entry point. Confirm receipt of the intended version and document how the deployment pipeline should handle the cache.
Related guides
- How to Compare PHP Settings for Web and CLI Runs
- How to Diagnose Stale Content and HTTP 304 Responses
- Developer Resources articles
Official references
Ferkesh Hosting. Last reviewed .
Byl tento článek užitečný?
Zpětná vazba byla odeslána!