D - Code Planet

There are 2 ways to do caching in asp.net.
1. Output Caching

2. Data Caching

1. Output Caching : Ability of ASP.NET to cache entire output from a asp.net webpage.

Implementation of output cache –
Add following line below the page directive 

It generate page once, then other all subsequent requests in certain time frame, when user requests page dont run it through asp.net just return the HTML that was generated on the previous run.
IF VaryByparameter =”CategoryId” THEN

ASP.NET cache page depends on categoryId, when a userrequest a page with the same categoryId in query string then the cached version of page will be displayed.

If another user request the same page with another categoryId then asp.net generates page again.

For 2 query string Parameters – VaryByParam=”ProductId;Quantity”

Substitution Control – When only one part of page need to regenerate every time, use substitution control.

Substitution control defines an…

View original post 136 more words

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s