2009/4/9 FrancK <[email protected]>

>
> Hi all,
> I'm using NH2 with Syscache (with some cache region in app.config)
>
> Is there a way to change programmatically the expiration of some
> region ?


You can do it writing your own cache provider but I'm not sure it is a
best-practices and allowed with all underlining cache.


>
> Moreover how can I refresh some cached objects ?
> IList list = session.CreateCriteria(typeof (Customer)).List();
> for (int i = 0; i < list.Count; i++) {
>    session.Refresh(list[i]);
> }


Take a look to some other methods (about cache) of ICriteria/IQuery
(SetCacheMode ;) )


> Can I clear the 2nd level cache ?


Yes.
http://nhforge.org/doc/nh/en/index.html#performance-sessioncache
-- 
Fabio Maulo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to