Are ASP.NET Response Cache and ASP.NET HttpRuntime.Cache completely different?
Is there any operation on the Response Cache that would affect HttpRuntime.Cache?
Greetz
Robert
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not exactly sure about you mean by Response Cache but AFAIK, there is only one cache store per ASP.NET application domain. Output caching also goes to the same cache store (however cache keys would be generated by ASP.NET based on url and cache policy).
Response.Cacheis the cache policy object that allows you to query/control ASP.NET output caching problematically.So to answer your question – Yes, output caching will definitely affect
HttpRuntime.Cache. But its unlikely to affect the items that you had set manually because keys chosen by your are very unlikely to conflict with keys generated by ASP.NET runtime.EDIT
One thing that I have missed to mention is that starting from .NET 4, output cache supports
provider model – so you can have your own OutputCacheProvider that can have a different store than runtime cache.