-->
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 cache
PostPosted: Thu May 12, 2005 5:14 am 
Newbie

Joined: Mon Sep 06, 2004 3:11 pm
Posts: 8
I haven't found any specific documentation that details this, just pieces that allude to it.

Say I have a report object that is mapped in Hibernate with a composite primary key. The key is report number and a report version. If I have the second level cache enabled, the report object will be cached in a disassembled state with the composite key as the cache key.

If I wanted to query for the report object by name using Query.list(). It will not retrieve the report from cache since I am not querying by primary key. If I make the query cacheable, Query.setCacheable(true), list() will retrieve and cache the reports' primary keys. The next time I query by report name, the report primary key will be retrieved from the query cache. The primary key will then be used to retrieve the report from the second level cache.

Is this correct?

If there are multiple nodes in a cluster using jBoss replicated cache, if one node creates a new object, in order for the other nodes to be able to retrieve the objects from cache, query cache needs to be enabled.


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.