I use ehcache (2.10.6) with DynamicAttributeExtractor to be able to search through the cache elements by their fields. Doc says that the DynamicAttributeExtra
DynamicAttributeExtractor
DynamicAttributeExtra