-->
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: Get control over a second level cache
PostPosted: Mon Jul 17, 2006 9:38 am 
Beginner
Beginner

Joined: Tue Jan 17, 2006 12:55 pm
Posts: 49
Is there a simple way to tell NHibernate explicitly what I want to cache?

In my domain model, I have a top level entity which is essentially fixed reference data. In some places I just get the data for this entity but not for its collections, in others, I get the full object graph. I want to cache all the entities in the 'simple' form for use in lists etc and load the full object graph where required and replace the 'simple' form in the cache with the fully loaded version whenever it is retrieved.


FYI:For use in the rest of the application, this entity has a flag called IsLoaded which is set by one of the methods that explicily loads the full object graph. This is a painfully slow process, so I only call it whenever it is really necessary and I cache it outside of NHibernate (using the web cache)... I would really like to implement this caching closer to the Repository/Data Access layer.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 19, 2006 11:11 am 
Beginner
Beginner

Joined: Tue Jan 17, 2006 12:55 pm
Posts: 49
So many people have viewed this but no answers! Can non one help? Or is is so simple that I am asking a stupid question?


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.