-->
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: Unexpected query-cache behaviour
PostPosted: Fri Jun 04, 2004 4:29 am 
Newbie

Joined: Wed May 26, 2004 9:56 am
Posts: 1
In the past few days I've been taking a look at the hibernate cache with EHCache. I think I've got the hang of session, second level and query cache and it works just fine.

There's only one strange thing I ran into.

When I have a query with setCachable(true) and <cache usage="read-only"/> in the corresponding mapping file everything works fine.

But when I remove the line <cache usage="read-only"/> in the mapping file and leave setCachable(true) the query is executed four times!!

When I remove the line <cache usage="read-only"/> in the mapping file and set setCachable(false) the query is executed one time which is the expected behaviour!!

I've been stepping through my code and I'm sure it's not me executing the query four times!

Is this a bug or expected behaviour?


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.