From: scardinius Date: Wed, 7 Apr 2021 08:38:51 +0000 (+0200) Subject: dev/core#2516 Invalidate only smart groups X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ddd2e3cb587986c897ef401c234606a9a45db14f;p=civicrm-core.git dev/core#2516 Invalidate only smart groups --- diff --git a/CRM/Contact/BAO/GroupContactCache.php b/CRM/Contact/BAO/GroupContactCache.php index 3e75e85133..f8f45dbe83 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", [ + WHERE id = %1 AND saved_search_id IS NOT NULL", [ 1 => [$groupID, 'Positive'], ]); }