Difference Between ASP.NET Caches

What's the difference between:

  • HttpRuntime.Cache["key"]
  • HttpContext.Current.Cache["key"]
  • HttpContext.Current.Application["key"]

Are there any significant differences between these memories?

+3
source share
1 answer

HttpContext.Current.Cacheand HttpRuntime.Cachematch, the context cache hint returns a run-time cache. HttpRuntimeand HttpContextjust return the descriptors of this object.

HttpRuntime.Cache recommended, but probably it will not affect most applications.

HttpContext.Current.Application , . , , . , . , , .

+1

All Articles