I want to increase my Apps speed and avoid heavy calls to the server by applying Android LruCache. Here is my scenario :
I've create 2 LruCache objects.
private LruCache<String, List<Items>> mListItemsCache;
private LruCache<String, Items> mItemsCache;
mItemsCache will hold cache of all the items which could be retrieved by unique Id string. On the other hand mListItemsCache will be cached of all the different Items list. Each list was build base on available items on mItemsCache.
My question is that the Item which was retrieved from mListItemsCache or mItemsCache is actually the same Object ?
Does the data will be duplicated each time it was store to LruCache due to put(K,V)?