I am using caffeine cache and base use case is simple key value lookup based on primary key of objects however the values are objects and can be looked in in multiple ways and often resulting a list, So there are few questions that i have on this topic. is this supported in Caffeine? If not are there any other caching solutions that support such features? I am currently loading the map to support all possible lookup and creating my own custom keys, can there be any better strategy? Thanks for sharing.
Asked
Active
Viewed 52 times
0
-
2You could use the asMap() view to mirror your existing behavior, e.g. if using the compute methods. If you need secondary keys to a single value, this [ancient article](https://github.com/ben-manes/concurrentlinkedhashmap/blob/wiki/IndexableCache.md) discusses an approach, but could be much less verbose now if using the compute methods, etc. – Ben Manes Jun 21 '23 at 16:20