views:

37

answers:

2

Hi folks,

When someone uses the OutputCache directive in an ASP.NET WebForms/MVC application, does it actually do any caching server-side, like using the Cache or does it only setup some properties in the Response object like the Cache-Control property?

Cheers :)

+1  A: 

Output Caching caches the entire rendered markup of an ASP.NET web page or User Control for a specified duration.

Espo
yeah - but where? u are saying.. in the memory instead of just setting the response data?
Pure.Krome
You can choose how the output-cache is stored with the OutputCacheLocation Enum: http://msdn.microsoft.com/en-us/library/system.web.ui.outputcachelocation.aspx
Espo
The OutputCacheLocation only tells the server how to set the HTTP header. The server will still cache the rendered output and store it in memory in case the browser requests the content again (regardless of what the header tells it to do).
Stephen M. Redd
A: 

It caches the results and stores them in memory on the server.

Stephen M. Redd