Difference between Windows Azure Cache(Preview) and Windows Azure Shared Cache

With the release of Windows Azure Caching (Preview) and there is already Windows Azure Shared Cache there are lots of question what these cache are and how to use them. I decide to write this article to provide the differences between them so users can understand it properly.

To start, the main difference between Windows Azure Cache(Preview) and Windows Azure Share Cache is that Windows Azure Caching (Preview) is configured in within your role specific Virtual Machines. You have ability to either share a % of virtual machine resources from your existing Virtual Machine (co-located model) to use a Cache or just dedicate a full Virtual Machine as dedicated cache (Dedicated model). While Windows Azure Shared Cache is a dedicated cloud cache service configured for your application in cloud. From there you can actually understand how the implementation would differ in between two.

Windows Azure Cache (Dedicated and Co-located) Preview:

Windows Azure Cache (Preview) has the following advantages:

  • Pay no premium for caching. You pay only for the compute resources that host the cache.
  • Eliminates cache quotas and throttling.
  • Offers greater control and isolation.
  • Improved performance.
  • Automatically sizes caches when roles are scaled in or out. Effectively scales the memory that is available for caching up or down when role instances are added or removed.
  • Provides full-fidelity development time debugging.
  • Supports the memcache protocol.

 

This image explains Windows Azure Dedicated Cache (Preview):

 

This image explains Windows Azure Co-Located Cache (Preview):
 

 

How to Start Sample: https://www.windowsazure.com/en-us/develop/net/how-to-guides/cache/
FAQ: https://msdn.microsoft.com/en-us/library/windowsazure/hh914142
When you are using Windows Azure Cache (Dedicated and Co-located Cache) you must get the references using NuGet as described below (This is released as preview):
https://www.windowsazure.com/en-us/develop/net/how-to-guides/cache/#NuGet

Using the NuGet package has to following advantages:
- Cleaner experience with richer tooling. 
    -- Customers don’t need to hunt down assemblies in the file system.
- Assemblies are automatically updated and pushed out by the author
- Web.config transforms/modifications are added to configure a client to access the cache

Windows Azure Shared Cache:

Windows Azure Shared Caching enables you to easily provision a cache in the cloud, to be used from any applications or services that could benefit from caching. Here is an overview of Overview of Windows Azure Shared Caching: https://msdn.microsoft.com/en-us/library/windowsazure/hh697519

 

This image explains Windows Azure Shared Cache:

 

How to get started SAmple: https://msdn.microsoft.com/en-us/library/windowsazure/gg278346.aspx
When you are using Windows Azure Shared Cache then you should use references located below:
C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\2012-06\ref\

FAQ: https://msdn.microsoft.com/en-us/library/windowsazure/hh697522

 

Keyword: Windows Azure, Cache, Dedicated, Co-located, Caching