Merge "GroupsUpdate: Evict group caches on group creation" into stable-2.16

This commit is contained in:
Alice Kober-Sotzek
2018-12-20 11:13:21 +00:00
committed by Gerrit Code Review
2 changed files with 13 additions and 0 deletions

View File

@@ -345,6 +345,9 @@ public class GroupsUpdate {
}
private void updateCachesOnGroupCreation(InternalGroup createdGroup) throws IOException {
groupCache.evict(createdGroup.getGroupUUID());
groupCache.evict(createdGroup.getId());
groupCache.evict(createdGroup.getNameKey());
indexer.get().index(createdGroup.getGroupUUID());
createdGroup.getMembers().forEach(groupIncludeCache::evictGroupsWithMember);
createdGroup.getSubgroups().forEach(groupIncludeCache::evictParentGroupsOf);