• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (inactive)
You are here: Home / Programming / MAMP Cache Settings

MAMP Cache Settings

Last updated on March 6, 2014 by Sal Ferrarello

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

  1. Confirm the PHP 5.5.3 Cache is disabled by clicking the Open start page button in MAMP.
  2. Click the phpInfo button along the top menu on the localhost MAMP webpage
  3. 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.

Sal Ferrarello
Sal Ferrarello (@salcode)
Sal is a PHP developer with a focus on the WordPress platform. He is a conference speaker with a background including Piano Player, Radio DJ, Magician/Juggler, Beach Photographer, and High School Math Teacher. Sal can be found professionally at WebDevStudios, where he works as a senior backend engineer.

Share this post:

Share on TwitterShare on FacebookShare on LinkedInShare on EmailShare on Reddit

Filed Under: Programming

Reader Interactions

Comments

  1. Nico says

    March 12, 2023 at 5:11 pm

    You have the best favicon ever

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright © 2023 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in