Search code examples
cachingazureazure-caching

Azure CreateRegion "This operation is not supported by the cache."


I'm trying to add a region using Azure Datacache object but I'm getting such error "This operation is not supported by the cache."

Dim dataCache As DataCache = dataCacheFactory.GetDefaultCache()
Dim tagList As New List(Of DataCacheTag)() From {New DataCacheTag("tagList")}

dataCache.CreateRegion("region-1")

dataCache.Put("key-name", "key-value", New Timespan(0, 10, 0), tagList, "region-1")

Solution

  • If you follow the link below you will see that Windows Azure Cache API does not support dataCache.CreateRegion():

    Caching API Support in Windows Azure Caching

    But it sure is supported in Windows Azure Caching (Preview) so you can use either dedicated or co-located cache with your project if you want to create regions and handle cache respectively.

    If you want to know the difference between Windows Azure Shared Cache and Windows Azure Caching (Preview) please take a look at my blog: Difference between Windows Azure Cache(Preview) and Windows Azure Shared Cache