[hibernate-dev] Spring Cache Abstraction

Steve Ebersole steve at hibernate.org
Wed Feb 23 11:25:24 EST 2011


I have not looked at the spring code you mention specifically, however caching 
entity instances directly as opposed to storing the entity states is never 
going to work.  Going this route requires that you synchronize access to the 
entities in the application since multiple threads/transactions would refer to 
this same instance. 

Now there as been discussion about allowing sotrage of certain types of 
entities directly into the second level cache (think reference tables).  But 
there are very strict requirments there.  Like only immutable entities would 
be eligible; only entities without associations would be eligible; etc.

On Wednesday, February 23, 2011, at 10:04 am, Marc Schipperheyn wrote:
> It would be interesting to have the Hibernate team comment/blog on the new
> Spring Cache Abstraction functionality and how it relates to Hibernate
> managed entities. Perhaps some strategies, etc. It's very attractive to
> just cache entities in stead of caching entity values with the second
> level cache.
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev

---
Steve Ebersole <steve at hibernate.org>
http://hibernate.org



More information about the hibernate-dev mailing list