From 044e2410c0667d578049a46d0f8aee75b8a16967 Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 24 Jul 2018 15:40:18 +1200 Subject: [PATCH] Reduce config required to use Redis. Specifying the default port sensibly removes one config step & makes sysadmins happier --- templates/CRM/common/civicrm.settings.php.template | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/CRM/common/civicrm.settings.php.template b/templates/CRM/common/civicrm.settings.php.template index 2895fed38c..34aaafe59d 100644 --- a/templates/CRM/common/civicrm.settings.php.template +++ b/templates/CRM/common/civicrm.settings.php.template @@ -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); + } } /** -- 2.25.1