Friday, January 23, 2009

Caching in Asp.net

ASP.NET gives you the ability to cache the output of pages or portions of pages in memory to improve performance.

The main reason to cache is to reduce the latency and increase the scalability of an application while reducing the server resources required to deliver its page content.

Latency is a measure of the time it takes for an application to respond to a user request. Scalability is the ability of an application to handle increased numbers of users.

If a page is cached on the server, the rendered HTML stored in memory is served instead of a freshly generated page from the server. Because it takes less time for the client to get the page and display it, your web site will seem more responsive.

If pages are completely static, deciding to cache them is a no-brainer. But the decision gets trickier if pages must vary their content in response to one of the following:

-Query string parameters

-Client browser type (e.g., Internet Explorer, Netscape, and so on)

-Custom parameters

-Database content

Read MOre..

No comments: