Hi all.
This is part of the Web.config
<configSections>
<section name="syscache"
type="NHibernate.Caches.SysCache.SysCacheSectionHandler,
NHibernate.Caches.SysCache" />
</configSections>
<syscache>
<cache region="moneda" expiration="500" priority="3" />
<cache region="unidad" expiration="400" priority="4" />
</syscache>
This is part of the hibernate.cfg.xml
<property
name="hibernate.cache.provider_class">NHibernate.Caches.SysCache.SysCacheProvider,
NHibernate.Caches.SysCache</property>
<property name="hibernate.cache.use_second_level_cache">true</
property>
This is the class mapping
<class name="Moneda">
<cache region="moneda" usage="read-write"/>
This is the method implementation
ICriteria criteria = this.createCriteria();
criteria.Add(Expression.Eq("Activo", true));
criteria.AddOrder(Order.Asc("Descripcion"));
criteria.SetCacheable(true).SetCacheRegion("moneda");
return criteria.List<Moneda>();
But each time I execute the method I see a DB hit (using SQL Server
profiler).
What am I forgetting ?
Thanks Diego.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---