3

My ASP.Net application uses HTTPRuntime.Cache. If I host it on Azure:

  1. Will there be any compilation errors assuming HTTPRuntime.Cache is not supported on Azure
  2. There will not be any compliation errors, but HttpRunTime.Cache always returns null for any requested key
  3. HttpRuntime.Case just works fine

Which of my assumptions is correct?

coder_bro
  • 10,503
  • 13
  • 56
  • 88

1 Answers1

3

You can use HttpRuntime.Cache in Azure web role without any problem as we too are using it. Thing to keep in mind is that this Cache is machine specific, in case you have multiple instance running, each would have its own cache data.

Chandermani
  • 42,589
  • 12
  • 85
  • 88
  • 1
    Unless there is a specific documented prohibition or permission issue with an API, all of the .Net API is available for use. There are plenty of hits on Bing for the search terms "azure httpruntime cache" that show examples. – Joe Brinkman Dec 21 '10 at 16:28
  • Can i use the same cache for Worker role and control role? – Wilson Sep 22 '14 at 14:14