From b4574db93de7e8c5d9256bc7408c832cf3dafe79 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Fri, 29 Oct 2021 19:04:11 +0100 Subject: [PATCH] Remove unused function --- CRM/Contact/BAO/GroupContactCache.php | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/CRM/Contact/BAO/GroupContactCache.php b/CRM/Contact/BAO/GroupContactCache.php index 4f77fe27bc..0fb98d5dbc 100644 --- a/CRM/Contact/BAO/GroupContactCache.php +++ b/CRM/Contact/BAO/GroupContactCache.php @@ -156,33 +156,6 @@ AND ( } } - /** - * Store values into the group contact cache. - * - * @todo review use of INSERT IGNORE. This function appears to be slower that inserting - * with a left join. Also, 200 at once seems too little. - * - * @param array $groupID - * @param array $values - */ - protected static function store($groupID, &$values) { - $processed = FALSE; - - // sort the values so we put group IDs in front and hence optimize - // mysql storage (or so we think) CRM-9493 - sort($values); - - // to avoid long strings, lets do BULK_INSERT_COUNT values at a time - while (!empty($values)) { - $processed = TRUE; - $input = array_splice($values, 0, CRM_Core_DAO::BULK_INSERT_COUNT); - $str = implode(',', $input); - $sql = "INSERT IGNORE INTO civicrm_group_contact_cache (group_id,contact_id) VALUES $str;"; - CRM_Core_DAO::executeQuery($sql); - } - self::updateCacheTime($groupID, $processed); - } - /** * Change the cache_date. * -- 2.25.1