private void evictCachedUsersForGroup(Group group)
    {
        // Get all nested groups, removing any cyclic dependency.
        final Set<Group> groups = getSharedGroups( group );

        // Evict cached information for affected users.
        groups.forEach( g -> {
            g.getAdmins().forEach( jid -> evictCachedUserForGroup( jid.asBareJID()) );
            g.getMembers().forEach( jid -> evictCachedUserForGroup( jid.asBareJID()) );
        });

        // If any of the groups is shared with everybody, evict all cached groups.
        if ( groups.stream().anyMatch( g -> g.getSharedWith() == SharedGroupVisibility.everybody)) {
            evictCachedUserSharedGroups();
        }
    }
Evict from cache all cached user entries that relate to the provided group.

@param group The group for which to evict cached user entries (cannot be null).
xmppserver/src/main/java/org/jivesoftware/openfire/group/GroupManager.java