How do I Disable the Code Cache for PHP 5 (FPM) with Nginx?

caching, nginx, php

Solution

My solution was in the Zend OPCache configuration rather than APC.

I installed the vanilla version of WNMP (PHP 5.5.11) on my Windows 8.1 box and discovered in my `php.ini` file's `[opcache]` section that the Zend OPCache was enabled and only checking file changes once every 60 seconds (`opcache.revalidate_freq=60`). Look for that config directive and set it to `0` to force the OPCache to check php files on each request.

Problem

When I save changes to a PHP file and then reload, it continues to execute the old version of the script for a minute or so regardless of how many refreshes I do. After 1 minute (or so) it executes the current version. How do I disable this behaviour so changes occur immediately? Setup is PHP-FPM with Nginx.

Original source