-->
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.  [ 2 posts ] 
Author Message
 Post subject: Difference between CacheMode.PUT and REFRESH
PostPosted: Thu Mar 08, 2007 2:49 pm 
Newbie

Joined: Wed Feb 21, 2007 3:35 am
Posts: 6
In hibernate reference about the CacheMode
http://www.hibernate.org/hib_docs/v3/re ... ssioncache

Quote:
CacheMode.PUT - write items to the second-level cache, but don't read from the second-level cache

CacheMode.REFRESH - write items to the second-level cache, but don't read from the second-level cache, bypass the effect of hibernate.cache.use_minimal_puts, forcing a refresh of the second-level cache for all items read from the database


Does that mean in CacheMode.PUT, any update made in the session will be put in the cache but anything read (but not updated by the session) will not be put in second-level cache.

Or in other words, if say an entity A in the second-level cache is stale, in CacheMode.PUT, after it is read from DB, the updated value will not be put into the cache?

Thanks.


Hibernate version:
3.2.2ga


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 22, 2007 1:22 am 
Newbie

Joined: Tue May 16, 2006 8:54 pm
Posts: 5
I am also interested in the answer to this question. Is there any case where using CacheMode.PUT would read an entity that currently exists in the 2nd level cache and not replace it?


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

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.