CRM-16642 Switch to opportunisticCacheRefresh calls.
[civicrm-core.git] / CRM / Activity / BAO / Activity.php
index ea3077a2e6e4675da2e0bc7b9e90e7afcd5e2fca..d4027444e5ecb35f7afd6faec2b721862a134a0e 100644 (file)
@@ -584,8 +584,7 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
       }
     }
 
-    // reset the group contact cache since smart groups might be affected due to this
-    CRM_Contact_BAO_GroupContactCache::remove();
+    CRM_Contact_BAO_GroupContactCache::opportunisticCacheRefresh();
 
     if (!empty($params['id'])) {
       CRM_Utils_Hook::post('edit', 'Activity', $activity->id, $activity);