OK, I have been doing some more reading and it appears that there are two separate Cayenne-3.0 caching models:

        1. Query Caching
        2. Object Caching

I am starting to think that I have a fundamental misunderstanding about the concept of "shared cache".

Question:
In a JSP webapp scenario with sessions, it appears that each session gets its own ObjectContext (via getThreadObjectContext()). If this is true, then, for example with an ECommerce site with a Product abstraction, if one user queries Cayenne for a list of Products, and then a second user makes the identical request are there ultimately two data objects created for each Product or just one data object?

My expectation used to be that there was one data object for each Product, but given my reading, it appears that there are two. If there are two, and I really want just one, should I start implementing some sort of query caching?

Thanks,
Joe

Reply via email to