Search code examples
spring-bootigniteapacheignite

How to directly Write in List data type in Ignite Cache on getting value from key ,Cache in the type of IgniteCache<Integer,List<Integer>>


I have my Ignite Cache in form of IgniteCache<Integer,List> cache and I have to put value in list inside IgniteCache directly but when i am trying to put value using cache.get(key).add(value) , it not adding value to the list inside cache directly.

Is their any way to add value directly in List inside Cache without storing it in different instance and then put that instance again in cache?


Solution

  • No, you have to adjust the object and save it back using put method.

    You can save some time on deserialization using withKeepBinary. But that doesn't make sense for Integers.

    Think of traversing your collection into a SQL model if possible.