Using MAMP 2.2 I’ve found a delay in pages updating after I modified them, which is maddening when working on things. The culprit is the MAMP Cache Settings.
Clearing MAMP Cache Settings
I’ve discovered OPcache is enabled by default for PHP Version 5.5.3 (and other versions, as well).
This can be disabled by commenting out the OPcache lines in the php.ini file.
Which php.ini file to modify MAMP Cache Settings?
/Applications/MAMP/bin/php/php5.5.3/conf/php.ini
Which lines to comment out?
You'll find the lines to be commented out on lines 1085-1092. The lines are: [OPcache] zend_extension="/Applications/MAMP/bin/php/php5.5.3/lib/php/extensions/no-debug-non-zts-20121212/opcache.so" opcache.memory_consumption=128 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=4000 opcache.revalidate_freq=60 opcache.fast_shutdown=1 opcache.enable_cli=1
Once commented out the lines should now look like
#[OPcache] #zend_extension="/Applications/MAMP/bin/php/php5.5.3/lib/php/extensions/no-debug-non-zts-20121212/opcache.so" # opcache.memory_consumption=128 # opcache.interned_strings_buffer=8 # opcache.max_accelerated_files=4000 # opcache.revalidate_freq=60 # opcache.fast_shutdown=1 # opcache.enable_cli=1
Confirm the Change
- Confirm the PHP 5.5.3 Cache is disabled by clicking the Open start page button in MAMP.
- Click the phpInfo button along the top menu on the localhost MAMP webpage
- Search the page for opcache. This value will still appear in the Configure Command but should not appear anywhere else on the page.
Thanks to Dustyn Doyle for his help with this fix.
You have the best favicon ever