Develop for Windows Azure Cache Service (Preview)
Cache Service (Preview) provides a set of APIs to add, update, and remove items from a cache. Using the classes and methods in the Microsoft.ApplicationServer.Caching namespace is a direct way of interacting with a cache. Whereas, using one of the ASP.NET providers is an indirect way of using a cache. The topics in this section cover direct programmatic use of Cache Service (Preview). For more information about the ASP.NET providers for Cache Service (Preview), see ASP.NET 4 Cache Providers for Windows Azure Cache Service (Preview).
The Cache Service (Preview) programming model is designed for the cache-aside programming pattern. If your data is not present in the cache, your application, and not the distributed cache, must reload data into the cache from the original data source.
Cache-aside Programming Considerations
Design application code to function independent of the cache, so that the application continues to function if the cached data is not available. Because data in the cache is not persisted in a durable fashion, the possibility exists that the data in the cache could be unavailable. For example, if a cache is scaled to a different cache offering, the cached items in memory are lost. Requesting an item that does not exist in the cache is referred to as a cache miss.
When using the Cache Service (Preview) high availability feature, backup copies of cached items help to guard against machine and process failures on a cache. Even with high availability enabled, there is a chance, no matter how remote, that all cache data is lost due to a major disaster event. Items that require persistence must use a database or other persistent-storage techniques. For more information, see High Availability for Windows Azure Cache Service (Preview).
There are many other reasons that your code might encounter a cache miss. For example, the cache item might have expired or been evicted based on normal expiration and eviction policies. Regardless of the reason, the application code must be able to access the original data source to repopulate the item in the cache. For more information, see Expiration and Eviction for Windows Azure Cache Service (Preview).
In this section
ConceptsHow to: Create a Cache for Windows Azure Cache Service (Preview)
Other ResourcesWindows Azure Cache Service (Preview)