title: How to set up SysCache on Fluent NHibernate?
body: <p>Using this, I can tell Fluent NHibernate to use SysCache as a 2nd Level Cache Provider:</p>
  
  <pre><code>MsSqlConfiguration.MsSql2008.ShowSql().ConnectionString(x =&gt;
              {
                  x.Server(@"localhost\ANDREPC");
                  x.Database("mydb");
                  x.TrustedConnection();
              }).Cache(c =&gt; c.ProviderClass&lt;SysCacheProvider&gt;().UseQueryCache())
  </code></pre>
  
  <p>Besides, SysCache's configurations must be placed on Web.Config:</p>
  
  <pre><code>&lt;configuration&gt;
   &lt;configSections&gt;
    &lt;section name="syscache" type="NHibernate.Caches.SysCache.SysCacheSectionHandler,NHibernate.Caches.SysCache" /&gt;
   &lt;/configSections&gt;
  
   &lt;syscache&gt;
    &lt;cache region="foo" expiration="500" priority="4" /&gt;
    &lt;cache region="bar" expiration="300" priority="3" /&gt;
   &lt;/syscache&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>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.</p>
  
  <p>Thanks.</p>
  
  <p>PS: The official SysCache documentation is <a href="http://nhforge.org/doc/nh/en/index.html#caches" rel="nofollow">here</a> and it's not explanatory</p>