Cached Group Membership
object CachedGroupMembership
Represents a "cached group membership" row. Cached group memberships exist only for one reason, which only applies to the vCard4 (KIND/MEMBER) group method:
Every group has its list of members. When a contact's group memberships are changed, the contact is automatically set to dirty, but the group itself is not!
So we keep a copy of all group membership rows as "cached memberships". At the beginning of every sync, the group memberships of every contact are compared with its cached group memberships. If they differ, the respective contact group is set to dirty (because its memberships have changed).
Cached group memberships must not be used for anything else that detecting dirty groups.