-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Question on Caching-Strategies (alias usage)
PostPosted: Thu Mar 19, 2009 11:49 am 
Newbie

Joined: Thu Mar 19, 2009 11:07 am
Posts: 6
Hello all,

I have a question for my understanding regarding the concurrency strategies of the second level cache. In Java Persistence with Hibernate the description of the nonstrict-read-write cache says "Makes no guarantee of consistency between the cache and the database. If there is a possibility of concurrent access to the same entity, you should configure a sufficiently short expiry timeout. Otherwise, you may read stale data from the cache."

Maybe I am missing a very basic concept but could somebody think of an example scenario in which I will get this trouble. I mean, if I change an entity that is held by the 2nd level cache the tablespace gets invalidated and the next access for this object triggers a database hit. Where is the mistake in my thinking?

Or maybe someone has a link to another page describing this problem. I am playing with this for quite some time now and I was not able to create sample code, that has read old data from the cache.

I appreciate every help. Thanks in advance.

Greets,
Patrick


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.