The grouping API allows the association of set of keys to a group. It would be useful to be able to obtain the set of keys associated with a given group.
In WildFly, a web session is stored using multiple cache entries, one entry for the session meta data (key is session id), and one entry for each session attribute (key is session id + attribute name). In order to look up find all the entries for a given session, the cache entry storing the meta has to store an additional Set<String> of attribute names so that I can locate all session attribute cache entries for a given session. Not only information redundant and bloats the session, but if I add or remove session attributes, I additionally need to replace the value for the cache entry containing the session meta data (since the set it contains will have mutated). This latter part could be avoided if Infinispan provided a mechanism to return all the cache keys that map to a given group.