I am looking into implementing offline mode for android but to get there I need to implement a caching system. I read and people suggest LruCache and saw an example for images here LruCache Example. Now i am not caching images, I would like to cache objects. So for example I have an object called "Customer" and customer has an Id and a Name, so as I understand it, i would add it to the cache as
Id being the key and the Name the value.
My question is what if I have another object called "Courses" I would need a separate cache for that correct?. Because if they are in the same cache there may be a Customer.Id that is the same as Courses.Id.
Or what would be the best way to implement this?. (first time implementing cache and also new to android).