CronJob for smart group rebuild / cache purge not working
I love the idea of being able to use smart / dynamic groups for our client's projects. In one particular case I'm heavily relying on CiviCRM relationships to mirror the organization's structures. Yet I would like to set up accompanying smart groups, that reflect certain relationships (or combination of relationships) to be able to address those smart groups in mailings or use them in the context of ACLs.
The problem I experienced over and over is that the rebuild process of the smart group cache doesn't work reliably.
I tested the two existing cronjobs for the rebuild process Job.group_rebuild and Job.group_cache_flush - yet they don't actually do what they're supposed to do, independent of the sequence in which I trigger them.
Only when I manually purge the system's cache (after I executed those cronjobs), the rebuilt smart groups are shown in the system. It might be possible that only the "Job.group_cache_flush" doesn't work correctly and therefore the smart groups are rebuilt by "Job.group_rebuild" but the result isn't shown in the system since the cache doesn't get purged.
I was able to reproduce this behaviour on several systems.