How do you manage multiple configurations for Azure cache.
We have one test and one live configuration.
If this was just a web role it could easily be managed by the web configurations transformations, however we have a worker role as well, and you can’t really have app.config transformations.
The cache in Azure only allows the “Default” as name, and you can only GetDefaultConfiguration() (as opposed to GetConfiguration(“name”)).
So how do you automatically swap between live and test Azure cache, since we have different urls for the cache.
It is possible to manually configure the DataCacheFactory in code, rather than using the custom configuration section in the web.config. If you do that, then you can store the settings in the .cscfg file and manage them along with all your other settings. You end up with some extra code to do the configuration, but it’s pretty straightforward. There are also some options that I believe can only be set through code, though that may not matter to you.
The configuration code is described in detail on MSDN.