Hi,
I have the below code -
Class CardCache
--------------------
private static ConcurrentMap<CacheKey,List<Card>> CardMap = new ConcurrentHashMap<CacheKey, List<Card>>();
Service Class
---------------
List<Card>
Cards = null;
Cards = CardCache.getCards("USA"); //Lets say this returns 5 cards
Cards.addAll(CardCache.getRateCards("NA")); //This returns 1. So I should have 6 cards in my Cards list. But along with this, my CardCache is also getting updated with a duplicate card having the value "NA"
I am not sure why this is the case.
Any help is appreciated.