-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate + cache issues
PostPosted: Thu Jul 27, 2006 9:44 am 
Newbie

Joined: Thu May 18, 2006 1:46 pm
Posts: 10
Hello there! I'd like to cache some collections using a read-write approach. Is it possible to invalidate the cache region for those collections every time a new object is inserted/deleted/updated? I was thinking in using a kind of Interceptor for this. Is this possible? How can i do this?

Regards


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 28, 2006 1:58 pm 
Newbie

Joined: Thu May 18, 2006 1:46 pm
Posts: 10
Adding another question to the cache questions :)

I have a Profile which has a Set of functions

Function is defined as a read-only in cache (since it will never change)

the set is defined as read-write, as the collection might be changed (new functions may be add/removed).

Well problem is hibernate is hitting the database n-times where n is the number of functions:

SELECT * FROM Functions where PROFILE_ID = ?

SELECT * FROM Functions where FUNC_ID = ? (loops thorough the result of the first query)

With no cache, this does not happen. What am I missing


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.