sciencegalleryderek / com.sciencegallery.mailchimp

CiviCRM Mailchimp list integration
6 stars 7 forks source link

Regenerating the group contact cache each time #4

Closed bhahumanists closed 11 years ago

bhahumanists commented 11 years ago

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...

sciencegalleryderek commented 11 years ago

Sounds reasonable - our installation rebuilds the cache on cron so it wasn't an issue - can you create a pull request and I'll merge?