michaelcourcy wrote:
I' m just a newbie in hibernate, but I think that what u ask for is one of the main feature of hibernate.
As long as u stay in a session scope (ie between tx.begin and tx.commit) all change in the collection only occur in memory.
Maybe I misunderstood your question ?
Michael Courcy
I understand that. But consider this situation. Server is being hit with identical requests for data. If I set up a cache on the class level, data will be cached on the first request. However following request will still hit the db to retrieve indexes and then based on the index it will retrieve data from the cache.
Alternatively I can set up a query cache and cache results, but if some of the data changes query cache will be dropped and next request will hit the db again.
This is unacceptable for me. On each request I want to access latest cached data and return copy of the data to the client without hitting the db. I
I can’t figure out if hibernate is capable of this, if someone can shed some light on this please help.