[NF] Add cache for groups.