From: scardinius Date: Wed, 14 Apr 2021 08:15:03 +0000 (+0200) Subject: dev/core#2516 Invalidate only smart groups - is smart group or has children X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=38b0ad12b043f43ff41cc8d70a649801307d34df;p=civicrm-core.git dev/core#2516 Invalidate only smart groups - is smart group or has children --- diff --git a/CRM/Contact/BAO/GroupContactCache.php b/CRM/Contact/BAO/GroupContactCache.php index f8f45dbe83..876b6dfd68 100644 --- a/CRM/Contact/BAO/GroupContactCache.php +++ b/CRM/Contact/BAO/GroupContactCache.php @@ -578,7 +578,7 @@ ORDER BY gc.contact_id, g.children public static function invalidateGroupContactCache($groupID) { CRM_Core_DAO::executeQuery("UPDATE civicrm_group SET cache_date = NULL - WHERE id = %1 AND saved_search_id IS NOT NULL", [ + WHERE id = %1 AND (saved_search_id IS NOT NULL OR children IS NOT NULL)", [ 1 => [$groupID, 'Positive'], ]); }