-->
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: CacheMode.GET
PostPosted: Thu Feb 24, 2011 8:45 pm 
Newbie

Joined: Thu Feb 24, 2011 8:27 pm
Posts: 1
Hello,

I seem to misunderstand the purpose of this setting of the CacheMode. Every x minutes, I'm running a query to retrieve objects that may have changed outside of my session/application. These objects have relationships with other objects which are read-only. So basically I load all my read-only objects once with CacheMode.NORMAL and then I retrieve the other objects with CacheMode.GET.

With that, I was expecting the query that I run every x minutes to go fetch my objects without storing them in the session cache (note that I don't use application level cache) since I set the CacheMode to GET. However this is not the case. When I step through the debugger, I see that the TwoPhaseLoad class put my objects in the cache anyway in addUninitializedEntity.

Is there really no way (other than calling evict after the query is run) to keep my modifiable objects out of the session cache? As noted earlier I don't have 2nd level cache and I don't use the query cache.

Thanks for any insight into this issue.


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.