Managing the PHP external cache

bsoremsugar —  November 19, 2008 — 1 Comment

With the introduction of 5.1.0a, there are now some additional configuration options available for your Sugar installation with regards to utilizing PHP external caches.  The new options to add to your config_override.php file are:

  • external_cache_disabled_zend
  • external_cache_disabled_memcache
  • external_cache_disabled_apc

Note that by default, these are all set to false.

Prior to Sugar 5.1.0a, the application would check for the existence of functions or extensions to determine which external cache to use (in order):

  • zend (tested by existence of the output_cache_get() function)
  • memcache (tested by the existence of the memcache extension)
  • apc (tested by the existence of the apc_store() function)

If you had all three installed and activated, you would match the check for zend first and thus be using zend.  If you had just memcache and apc installed, you would be using memcache since it is first in the check order.

With these new settings, you now have more granular control over which external cache is used.  For example, if you installed memcache for the purpose of storing your PHP sessions and wanted to use APC as your external cache, you would need to set ‘external_cache_disabled_memcache => true’  in your config_override.php file–it would also be wise to set external_cache_disabled_zend to true for good measure as well.

A recommendation when utilizing an external cache is to disable all of the possible caches you don’t intend to use to ensure that the proper one is being used.

For more information on the particular caches, please visit this Sugar Wiki article on using PHP accelerators with SugarCRM.

Trackbacks and Pingbacks:

  1. Using memcached in Sugar API - September 17, 2012

    [...] [...]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s