0

http://msdn.microsoft.com/en-us/library/azure/hh914155.aspx as reference.

Prior to switching to azure cache, our project could delete from the cache by prefix, ie with keys

user_1_config
user_1_items
user_2_config

we could delete all "user_1" items by iterating through the cache keys and if they key had the prefix "user_1". I'm not entirely sure that's a good way to use a cache, but we used it that way.

Switching to Azure cache, we no longer can access all the keys in the cache (likely with good reason). Instead, for searching they use Regions and Keys. A region is required to use keys, and all objects in a region reside on the same cache server.

We're looking to use the region to find things, and tags to find more specific things.

Is it safe to have a region for each user? What kind of overhead comes with a region?

Dave
  • 1,645
  • 2
  • 23
  • 39

1 Answers1

1

You could have a region per user, but there is a serious issue with this approach as you already mentioned, that being that a region is not highly available, meaning it's not replicated across multiple cache nodes.

Also, the In-Role cache or any other caching option is not the recommended way to go forward. Azure Redis Cache is, which supports your old scenario as well (e.g. deleting with a pattern/prefix etc.). I would recommend to take a look at that to see if it fits your needs better.

Panos
  • 1,953
  • 1
  • 14
  • 15