Get the version of php you use from the MAMP preferences pane.
Now, you want to edit your php.ini file for that version, and then restart MAMP.
The reason it is caching is because some versions of MAMP by default turn on OPCache.
sudo nano /Applications/MAMP/bin/php/[php-version]/conf/php.ini
Then, look for OPCache towards the end of the php.ini file, and comment out everything relating to it.