-->
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.  [ 3 posts ] 
Author Message
 Post subject: question about first level cache vs second level cache
PostPosted: Thu Sep 22, 2005 11:57 am 
Hi,

I'm newbie to nhibernate and i wonder how the second level work. Reading in the forum i 've found that the first level cache is hold by the Session object and i suppose that when the session is closed the cache is close too. But what about the second level ? does it hold data over the sessions so i could retrieve data in a new session whitout reading the DB (presuming these data was loaded in a previous closed session) ?

thanks,
cylt.


Top
  
 
 Post subject:
PostPosted: Thu Sep 22, 2005 2:41 pm 
Regular
Regular

Joined: Thu May 12, 2005 10:12 am
Posts: 71
Location: Buenos Aires, Argentina
That's right. Teh second level cache is there so that some objects are cached after the session is closed.

Be aware that if you're clustering this can become a problem. The sysCache provided in NHContrib uses the common ASP.NET session to store elements so it is possible to set it to work in a load balanced scenario.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 23, 2005 3:24 pm 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
Here is the documentation: NHibernate.Caches

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.