Passer au contenu principal

 Subscribe

If your current OrchardCMS site is running on multiple instances on Windows Azure Websites, then without using some form of distributed cache, caches will become out of sync between the different nodes in your farm.

Not all websites need a caching mechanism, but if you are looking to improve performance and the scalability of your application then Windows Azure Cache (Preview) would help. It can make your Azure website become more responsive even as user load increases. This separate distributed cache layer allows your data tier to scale independently for more efficient use of compute resources in your application layer.

Caching is meant to store data temporarily, which might mean hours, days or weeks. Some of the features of Windows Azure Cache Service(Preview) are:

  • Pre-built ASP.NET providers for session state and page output caching
  • Caches any serializable managed object like  XML, binary data to name a few
  • Access to a secure, dedicated cache
  • Share data across loosely couple applications running on Windows Azure

Cache Service (Preview) is available in the three following tiers: Basic, Standard and Premium. For more information, see AzureCacheTiers .

This tutorial shows you how to configure an Orchard CMS siterunning on Azure websites using Azure cache service. You will learn how to:

  1. Create a Basic Azure cache service endpoint
  2. Setup Orchard CMS to use Azure cache service endpoint

Create a Basic Azure cache service endpoint

First you need to login  into the Azure Management portal and create a new Azure cache service

7612.Sunitha MuthukrishnaOrchardCMSwithAzure Cacheimage1.png-550x526

Once the cache endpoint is created, you can access the cache service dashboard in the Management portal.

3058.Sunitha MuthukrishnaOrchardCMSwithAzure Cacheimage2.png-550x526

Make a note of the endpoint URL and the Primary Access key (Clicking on Manage Keys will display the endpoint Key).

You can create named caches for the Azure cache endpoint and configure it as desired. For this tutorial I am using the default named cache.

7411.Sunitha MuthukrishnaOrchardCMSwithAzure Cacheimage3.png-550x526

Setup Orchard CMS to use Azure cache service endpoint

If you don’t have an Orchard CMS Website, see How to create an Orchard CMS website on WAWS .To be able to use Azure Cache service with your Orchard CMS website you can either:

1. Access your Website dashboard in Azure Management portal  and under  the Configure Tab  include the following App
Settings :

8284.Sunitha MuthukrishnaOrchardCMSwithAzureCacheimage4.png-550x526

2. Edit web.config under your site root  and include the highlighted section under the   :

0003.11714.JPG-550x0

Restart your website in the Management portal to reflect the changes made to your website. That’s it you Orchard CMS website is using Azure cache service.
6562.Sunitha MuthukrishnaOrchardCMSwithAzure Cacheimage5

Performance

To test the impact of Azure Cache service on your website’s performance, you need to run a simple Visual Studio load test on your website.For more information, see How to run a Visual Studio Load Test

One thing to note is that the physical capacity is the only limiting factor based on the cache size you have purchased. There are no quotas or throttling for Azure cache service (Preview).

Monitoring 

The Azure Management Portal allows you to monitor the health of the service using the Cache Dashboard and Monitor Tab on the Cache dashboard.

The Cache dashboard outlines the health of your cache, the utilization and information of the various properties of your service. For more information, see Monitoring the cache service using the dashboard. The Monitor tab allows you to use the Management Portal for viewing a variety of service performance counters to troubleshoot issues. For more information see, monitoring the cache service using the Monitor tab

Additional Resources

Using Windows Azure Cache with Orchard CMS

What’s New in Windows Azure Cache Service (Preview)

How to Use Windows Azure Cache Service (Preview)

Migrate to Windows Azure Cache Service (Preview)

Optimization Guidance for Windows Azure Caching

  • Explore

     

    Let us know what you think of Azure and what you would like to see in the future.

     

    Provide feedback

  • Build your cloud computing and Azure skills with free courses by Microsoft Learn.

     

    Explore Azure learning


Join the conversation