Php Opcache (Php performance Increase – Cache Optimization)

image_pdfimage_print

A few words about the OPcache.

OpCode Cache“. “APC” is one of them. “Zend OPcache” is another one; and this Zend OPcache (or OPcache for short) is built into php 5.5, not APC.

The workaround is to disable the OPcache, which is enabled by default. It is a setting in php.ini file.

The question has been raised if disabling the OPcache before installation and enabling it right after would be good enough. While I don’t have a solid answer for that, it should be good enough to keep it disabled during installation and upgrades. I permanately turned it off on my test site.

 

if we can disable the OPcache per site basis. Like disabling it for a DomainCluster  sites and enabling it for others.

Yes,  can do that.

  • Developer can disable OPcache per site basis
  • Developer cannot enable it whenever Developers want it;
  • It should be enabled by default.
  • If developer has disabled it through php.ini file, then you need to revert it back.

Placing below line in your “settings.php” file will disable it.

 

 apache config should

has“AllowOverride All” in order to make the .htaccess method work; which is also a requirement for installing & running other properties.

This entry was posted in Php. Bookmark the permalink.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.