Micah
Micah

Reputation: 116120

HttpContext.Cache - Per Request or per App Domain?

Looking at the MSDN doc for .NET 2.0 of the HttpContext.Cache object it says this:

The Cache for the current HTTP request.

But looking at the .NET 3.0 version version it says:

The Cache for the current application domain.

That's a pretty significant difference in functionality. My experience in using it has always been that it was a Per Request cache. But the docs appear to disagree with me. What is the correct usage? Are the MSDN docs wrong?

Upvotes: 3

Views: 1622

Answers (1)

John Saunders
John Saunders

Reputation: 161783

The functionality hasn't changed, only the description.

"The Cache for the current HTTP request" is "The Cache for the current application domain", that is, the application domain in which the current request is executing.

Upvotes: 2

Related Questions