Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused function from GroupContactCache #21938

Merged
merged 1 commit into from
Oct 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions CRM/Contact/BAO/GroupContactCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,33 +156,6 @@ public static function add($groupIDs) {
}
}

/**
* 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.
*
Expand Down