I was seeing inconsistent results with this until I added a line to SyncSmartGroups.php to regenerate the appropriate Group Contact Cache before extracting the data:
after:
$group_contact_cache = new CRM_Contact_BAO_GroupContactCache();
I added:
$group_contact_cache->check(implode(',', $group_ids));
We've basically disabled the Group Contact Cache as it can't cope with the number of our groups, so the above regenerates the cache for the relevant groups each time. I think.
Seems to work perfectly now. But just thought I'd double check this makes sense as a thing to do...
I was seeing inconsistent results with this until I added a line to SyncSmartGroups.php to regenerate the appropriate Group Contact Cache before extracting the data:
after: $group_contact_cache = new CRM_Contact_BAO_GroupContactCache();
I added: $group_contact_cache->check(implode(',', $group_ids));
We've basically disabled the Group Contact Cache as it can't cope with the number of our groups, so the above regenerates the cache for the relevant groups each time. I think.
Seems to work perfectly now. But just thought I'd double check this makes sense as a thing to do...