Zurmo Cache System Explained
Zurmo doesn’t require any cache systems in order to work, although performance can be drastically improved if cache is used.
Memcache PHP library is used to cache data with a memcached server. There is some confusion among programmers between the Memcache and Memcached PHP libraries and the memcached caching system (usually written in lowercase which is actually a daemon process that runs in the background and executes commands that are provided via its API). Memcached PHP is a newer library, has more functions, and is faster. However, we found it to be a bit buggy, so we decided to stick with the older and more stable Memcache library. The storage for cache is abstracted, so if you decide to used Memcached instead, you can easily switch to it.
To make the caching system work, you first need to install memcached. memcached is a high-performance, distributed memory object caching system, generic in nature, but originally intended for use in speeding up dynamic web applications by alleviating database load.
Next, the Memcache PHP library must be installed, so PHP programs can communicate with the memcached daemon, store data to memcached, get data, delete data in memcached and so on.
During the installation of Zurmo CRM, you can enter settings for the memcached server, or you can configure it after installation is complete, in the app/protected/config/perInstance.php file. If you have multiple memcache servers, you can add them after installation is completed, in app/protected/config/perInstance.php. As an example, the server configuration might look like:
$memcacheServers = array( array( 'host' => '127.0.0.1', 'port' => 11211, // This is the default memcached port. 'weight' => 100, ), array( 'host' => '192.168.1.10', 'port' => 11211, // This is the default memcached port. 'weight' => 110, ), );
If you want to disable memcache, you need to provide an empty array:
$memcacheServers = array();
and in file app/protected/config/debug.php set:
$memcacheLevelCaching = false;
In addition to memcache caching, Zurmo uses PHP cache (static property) to store data. This option can be disabled by setting $phpLevelCaching = false in the app/protected/config/debug.php file.
If you need to explicitly clear all cache data, you can do so by appending the string ?clearCache=1 to your webserver url (for example, if Zurmo is installed under http://www.zurmo.org/app, you would append it to look like: http://www.zurmo.org/app/index.php?clearCache=1).