Configure cache clients for Azure Managed Cache Service

Important

Microsoft recommends all new developments use Azure Redis Cache. For current documentation and guidance on choosing an Azure Cache offering, see Which Azure Cache offering is right for me?

Managed Cache Service supports Azure Web Sites, Cloud Services, and Virtual Machines client applications, among others. The topics in this section provide an overview of the differences between these three major client types, and guidance for creating Managed Cache Service client applications.

Cache Service Client Application Types

The configuration steps for Managed Cache Service clients are very similar, with only minor differences between the different types. The Cache NuGet package which is provided handles most of the differences automatically. This topic describes the minor differences, and the topics in this section provide step-by-step guidance on configuring cache clients.

  • Azure Web Sites Cache Clients

  • Azure Cloud Services Cache Clients

  • Azure Virtual Machines Cache Clients

Azure Web Sites Cache Clients

Managed Cache Service supports Azure Web Sites client applications. ASP.NET web projects can be configured to use Managed Cache Service using the Cache NuGet package.

Note

The Cache NuGet package gives you everything you need to get started using Managed Cache Service from ASP.NET based Azure Web Sites, even if you don't have the latest Azure SDK installed. However, if you are using other Azure features such as Cloud Services, download the latest Azure SDK, currently SDK 2.1.

The Cache NuGet package adds the required assembly references and adds the configuration changes to the project's web.config file. Unlike web role client applications, cache client diagnostics are not available for Web Sites clients. Therefor the cacheDiagnostics section is not added by the Cache NuGet package for Web Sites clients. For more information, see About ClientDiagnosticLevel for Azure Managed Cache Service.

Azure Cloud Services Cache Clients

Both web role and worker role client applications can be configured to use Managed Cache Service. To get started developing role-based client applications that use Managed Cache Service, download the latest Azure SDK, currently SDK 2.1. Cloud Services projects can be configured to use Managed Cache Service using the Cache NuGet package. This package adds the required assembly references and adds the configuration changes. For worker role projects, the configuration is added to app.config, and for web role projects the configuration is added to the project's web.config file.

Azure Virtual Machines Cache Clients

Applications hosted on Azure Virtual Machines can also be Managed Cache Service clients. These applications are configured in the same way as the other client types, by using the Cache NuGet package. The configuration changes are added either to app.config or web.config based on the client application type.

To get started developing Azure Virtual Machines applications, download the latest Azure SDK, currently SDK 2.1.

In this section