-->
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: How do I use the QueryCache correctly?
PostPosted: Wed Sep 26, 2007 2:34 pm 
Regular
Regular

Joined: Tue May 31, 2005 9:55 am
Posts: 67
I have entity that I want to get cached in the Second Level Cache as well as cache the queries used to retrieve these entities. This is what I have done


Configure the SysCacheProvider (and enable caching)
Configure the entity to use a readonly-cache.
Assign a Cache Region and make my Criteria queries cachable.

I can see the queries being cached and the individual entities are being added to the readonly cache, but when I perform the query, the cached query results are obtained, but it is always individually retrieving the entity results (not pulling from the cache).

What did I do wrong? One thing I have noticed is that some of the NHib code uses the Full type name to build the cache key, while others use the fully qualified entity name. Is this a problem?

thanks,
craig[/list]


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.