Using this, I can tell Fluent NHibernate to use SysCache as a 2nd Level Cache Provider:
MsSqlConfiguration.MsSql2008.ShowSql().ConnectionString(x =>
{
x.Server(@"localhost\ANDREPC");
x.Database("mydb");
x.TrustedConnection();
}).Cache(c => c.ProviderClass<SysCacheProvider>().UseQueryCache())
Besides, SysCache's configurations must be placed on Web.Config:
<configuration>
<configSections>
<section name="syscache" type="NHibernate.Caches.SysCache.SysCacheSectionHandler,NHibernate.Caches.SysCache" />
</configSections>
<syscache>
<cache region="foo" expiration="500" priority="4" />
<cache region="bar" expiration="300" priority="3" />
</syscache>
</configuration>
Now what? What does these regions mean? How do I associate a region with a type? How do I make this to work? My jMeter tests sugest that after the configuration above my application got 7% slower than before.. I need to understand SysCache and learn how to continue with the configuration.
Thanks.
PS: The official SysCache documentation is here and it's not explanatory