-->
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: Query & Second level Cache
PostPosted: Wed Jun 29, 2005 10:53 am 
Newbie

Joined: Wed Jun 22, 2005 10:07 am
Posts: 5
Hibernate version: 3.0.4

Second level Cache Provider: EHCache

Hi,
1) I am executing a query with setCacheable(true) and a specific cache region namely "entity". I have enabled query cache as well. Am I right in thinking that all that this action does is store the sql string with the id's of the entities returned ?

2) If I want to take advantage of the second level cache do I have to specify a cache strategy for the entity returned by the query?

3)Does it matter if I use a different cache region for my query and my entity cache strategy?

4) Since I have already set a strategy for my entity why do I get the sql hits for subsequent queries( different sessions)? I only have one SessionFactory for my app.


Thanks


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.