From e45702ef70c173284c860d42572905642acff6d6 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sat, 18 Mar 2023 15:05:21 +1300 Subject: [PATCH] Remove duplicate layer of caching This is cached within a cache - the load of calling it is not especially high and it is somewhat unlikely the cache will be populated anyway so let's simplfiy... --- CRM/Dedupe/BAO/DedupeRuleGroup.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/CRM/Dedupe/BAO/DedupeRuleGroup.php b/CRM/Dedupe/BAO/DedupeRuleGroup.php index 59163f1986..a3ce6bbe64 100644 --- a/CRM/Dedupe/BAO/DedupeRuleGroup.php +++ b/CRM/Dedupe/BAO/DedupeRuleGroup.php @@ -143,12 +143,7 @@ class CRM_Dedupe_BAO_DedupeRuleGroup extends CRM_Dedupe_DAO_DedupeRuleGroup { */ private static function importableFields($contactType): array { - $cacheKeyString = 'importableFields ' . $contactType . '_0_0_0_1'; - $cacheKeyString .= '_' . CRM_Core_Config::domainID() . '_'; - - $fields = Civi::cache('fields')->get($cacheKeyString); - - if (!$fields) { + if (TRUE) { $fields = CRM_Contact_DAO_Contact::import(); // get the fields thar are meant for contact types @@ -208,8 +203,6 @@ class CRM_Dedupe_BAO_DedupeRuleGroup extends CRM_Dedupe_DAO_DedupeRuleGroup { //Sorting fields in alphabetical order(CRM-1507) $fields = CRM_Utils_Array::crmArraySortByField($fields, 'title'); - - Civi::cache('fields')->set($cacheKeyString, $fields); } return $fields; } -- 2.25.1