Windows Azure Cache Service in Kentico CMS

   —   
This article is a step-by-step guide on how to use Windows Azure Cache Service (still in preview mode) in Kentico CMS.
If you used AppFabric caching in your Kentico CMS projects running on Azure, you could be interested in replacing this caching option with a new Windows Azure Cache because AppFabric cache is no longer provided.

To make it work, you should follow the official guide from Azure documentation - How to Use Windows Azure Cache Service (Preview).

After initially creating the cache and configuring it, you need to open your project in Visual Studio and install Windows Azure Caching NuGet package for CMSApp web role as it is mentioned in the guide.

Another step is to remove xmlns attribute from <configSections> tag in your web.config file, replace the original <section name="dataCacheClients"> and <section name="cacheDiagnostics"> tags with the newly added ones and delete duplicate <configSections> tag.

The next thing to do is to remove xmlns attribute for <dataCacheClients> tag as well, put <autoDiscover isEnabled="true" identifier="[Cache role name or Service Endpoint]" /> tag to the original <dataCacheClients> section and delete the duplicate.

The rest of the steps should correspond to those mentioned in the guide, i.e. replacing [Cache role name or Service Endpoint] with the endpoint, which is displayed on the Dashboard in the Azure Management Portal.

The guide also contains sample codes for creating and retrieving objects from the cache, specifying expiration, storing ASP.NET session state, etc.
-fl-


Applies to: Kentico 7.x
Share this article on   LinkedIn