Caching is used frequently; rarely updated data can greatly improve the performance of websites and other high traffic applications. In this recipe, we'll configure NHibernate's cache, just as we would for a typical public facing website.
Complete the Getting Ready instructions at the beginning of Chapter 4, Queries.
NHibernate.Caches.SysCacheusing NuGet Package manager console.
App.configfile in the project.
configSectionselement, declare a section for the cache configuration:
<section name="syscache" type="NHibernate.Caches.SysCache.SysCacheSectionHandler, NHibernate.Caches.SysCache" />
<syscache> <cache region="hourly" ...