I am looking for a solution to cache complex objects in java at application level.
For example, i want to load some data set from database to memory and make my application services to work on top of the objects loaded into memory. I considered this in order to improve performance.
But I am wondering how to keep the relationships of an object in a cache.
That is for example,
If a category has many items, what is the best approach to store the relationship. My idea is to store category and items separately and store the relationship in some other place. This is because I use hibernate and the associations are configured to lazy loading.
Please share your thoughts to approach this problem.