Hi , Thank you very much for your response.
Do you use a multi node cluster? Yes , we are using multi node cluster When I said beans , I meant simple POJO . Thank you for confirming that it creates duplicate entries and infact with a test also it is confirmed . Problem with the two cache approach you suggested is , it requires 2 GET requests , if avg GET latency is 10 ms , for 2 cache gets doubled to 20 ms . either we will require some sort of server side function or mapping like <K1 , K2 ,K3, V> On Tue, 18 Oct 2022 at 21:49, Ilya Korol <[email protected]> wrote: > Hi, do you use multinode cluster? What do you mean by 'beans', is it > simple POJO or Spring bean? > > I don't think that this is a good idea to store Spring beans in ignite > cache, because all data that goes to cache would be transformed to so > called BinaryObjects (However you can give it a try with on-heap caching > https://ignite.apache.org/docs/latest/configuring-caches/on-heap-caching). > > If we're talking about storing simple POJOs, I doubt that Ignite caches > will realize that you want to avoid duplication, so internally in cache > this single value object (that was shared in Map) will be transformed to > multiple BinaryObjects (that will have exactly same content). You can > try to use two caches C1, C2, where in C1 we actually store intermediate > key to unique value instance and in C2 we store key -> intermediate_key > mapping. > > On 2022/10/14 06:31:55 Aravind J wrote: > > Hi , > > > > We had a requirement to make multiple keys mapping to the same bean in > > Ignite cache , is it possible ? As SQL query performance is not matching > > with get by key , we are looking for possible alternatives . If we use > > , putAll(Map<? extends K,? extends V> map) with different keys and same > > bean , how will bean get persisted , will it be duplicated in memory ? > > >
