Using advanced caching features
Azure Cache Service has simple functionalities to enable in-memory distributed cache for applications. As it is a data storage service (even though it is not persistent), some sort of search is required. As search in the whole cache surface could be slow, the Cache service is designed to support searches for only those objects that are located in user-defined regions. A user-defined region of cache is a logical group of key-value pairs located in the same portion of memory. We do not need to know how the Cache service behaves; however, think of regions like partitions for the Table Storage service.
Tip
In Chapter 5, Going NoSQL with Azure Tables, we saw how to use the Table Storage service, a scalable NoSQL-like key-value storage service. Table Storage organizes data into partitions that are logical groups of items located together.
The DataCache
class exposes methods to manage user-defined regions such as CreateRegion
, ClearRegion
, RemoveRegion
, and so on. Objects...