For this we need to setup a AppFabric Cluster on-premiseā¦. or setup a Caching Worker role (or colocated Caching) on Azure. The steps for the same are mentioned in this blog post: Configure MVC app to use onpremise AppFabric Cache or use Azure Caching. So once we have AppFabric Cache setup. to use this AppFabric Cache as the second level Cache in NHibernate is very simple: We need to add a nuget package as shown below (NHibernate second-level cache provider): One this has been added, this automatically ......
Here are the steps: I am using Windows Azure Caching preview on the cloud for caching purposes on Azure, which can be colocated Cache or a dedicated Cache Worker Role. Note we have not used the Azure AppFabric cache which is available as a separate service from Azure and comes at a high cost. I have an appSetting key that will be used to distinguish whether I will be using AppFabric Cache or System.Runtime.Caching.Memo... for my caching needs. 1: var cacheToUse = ConfigurationManager.AppSet... ......