X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FBAO%2FGroupContactCache.php;h=2ba71e2d77e731823424f59a71f3599226f63f8e;hb=d666ca085c68c57630f266c41906fe90089722f5;hp=cdb781dcbfc311091bf4f48fa15dd801d837e668;hpb=fd0f65903efba514c01917c42253598a6700bc2b;p=civicrm-core.git diff --git a/CRM/Contact/BAO/GroupContactCache.php b/CRM/Contact/BAO/GroupContactCache.php index cdb781dcbf..2ba71e2d77 100644 --- a/CRM/Contact/BAO/GroupContactCache.php +++ b/CRM/Contact/BAO/GroupContactCache.php @@ -210,17 +210,6 @@ AND g.refresh_date IS NULL } } - /** - * Fill the group contact cache if it is empty. - * - * Do this by the expensive operation of loading all groups. Call sparingly. - */ - public static function fillIfEmpty() { - if (!CRM_Core_DAO::singleValueQuery("SELECT COUNT(id) FROM civicrm_group_contact_cache")) { - self::loadAll(); - } - } - /** * Build the smart group cache for a given group. * @@ -354,7 +343,7 @@ WHERE id IN ( $groupIDs ) if (!isset($groupID)) { if ($smartGroupCacheTimeout == 0) { $query = " -TRUNCATE civicrm_group_contact_cache +DELETE FROM civicrm_group_contact_cache "; $update = " UPDATE civicrm_group g