Details
-
Type: New Feature
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.3.5
-
Fix Version/s: 3.4.alpha
-
Component/s: Core CiviCRM
-
Labels:None
Description
The enclosed patch adds optional settings to the civicrm.settings.php file that will be parsed and used by the CRM_Utils_Cache class. It should be backwards compatible with people who are now using Memcache with CiviCRM using the CIVICRM_USE_MEMCACHE setting.
The following settings have been added to the civicrm.settings.php.tpl file, which documents the settings. If these settings are not present in the config file, CiviCRM will initialize memcache exactly as it it does before the patch (host=localhost, port=11211, timeout=3600, and no prefix for Memcache keys):
<code>
/**
- Change this to the IP address of your memcache server if it is not on the
- same machine (Unix).
*/
define( 'CIVICRM_MEMCACHE_HOST', 'localhost' );
/**
- Change this if you are not using the standard port for memcache (11211)
*/
define( 'CIVICRM_MEMCACHE_PORT', 11211 );
/**
- Items in cache will expire after the number of seconds specified here.
- Default value is 3600 (i.e., after an hour)
*/
define( 'CIVICRM_MEMCACHE_TIMEOUT', 3600 );
/**
- If you are sharing the same memcache instance with more than one CiviCRM
- database, you will need to set a different value for the following argument
- so that each copy of CiviCRM will not interfere with other copies. If you only
- have one copy of CiviCRM, you may leave this set to ''. A good value for
- this if you have two servers might be 'server1_' for the first server, and
- 'server2_' for the second server.
*/
define( 'CIVICRM_MEMCACHE_PREFIX', '' );
</code>