Reduce config required to use Redis.
authoreileen <emcnaughton@wikimedia.org>
Tue, 24 Jul 2018 03:40:18 +0000 (15:40 +1200)
committereileen <emcnaughton@wikimedia.org>
Tue, 24 Jul 2018 03:41:48 +0000 (15:41 +1200)
Specifying the default port sensibly removes one config step & makes sysadmins happier

templates/CRM/common/civicrm.settings.php.template

index 2895fed38c7f76c79a1f5ef4e3ec215538ee336d..34aaafe59dd5fd46a87ff675924aa88a61bf3953 100644 (file)
@@ -368,7 +368,12 @@ if (!defined('CIVICRM_DB_CACHE_HOST')) {
  * The standard port for Memcache & APCCache is 11211. For Redis it is 6379.
  */
 if (!defined('CIVICRM_DB_CACHE_PORT')) {
-  define('CIVICRM_DB_CACHE_PORT', 11211 );
+  if (CIVICRM_DB_CACHE_CLASS === 'Redis') {
+    define('CIVICRM_DB_CACHE_PORT', 6379 );
+  }
+  else {
+    define('CIVICRM_DB_CACHE_PORT', 11211);
+  }
 }
 
 /**