C# .NET - Web Application

Asked By Mahesh B on 03-Feb-12 04:22 AM
Cache concepts in asp.net
Danasegarane Arunachalam replied to Mahesh B on 03-Feb-12 04:43 AM
The Cache class has been designed for ease of use. By using keys paired with values, you can place items in the Cache and later retrieve them. For examples of how to do this, see Adding Items to the Cache and Retrieving Values of Cached Items.

While the Cache class offers a simple interface for you to customize cache settings, it also offers powerful features that allow you to customize how items are cached and how long they are cached. For example, when system memory becomes scarce, the cache automatically removes seldom used or unimportant items to allow memory to be used to process a high volume of requests. This technique is called scavenging. It is one of the ways that the cache ensures that data that is not current does not consume valuable server resources.



Refer MSDN (http://msdn.microsoft.com/en-us/library/xsbfdd8c%28v=vs.71%29.aspx)
DL M replied to Mahesh B on 03-Feb-12 04:57 AM
Hi..
Read Here Cache concepts.

1)Caching is a concept of storing frequently used data into a temporary memory for faster access.

2) This is considered as a optimization technique to improve performance of
web server.

3) Caching is recommended when the pages having database communication for presenting data and expected with more number if requests.

4) asp 3.0 supports only entire page caching towards client side.

asp.net supports three types of caching

* Output caching
* Fragment caching
* Data caching

output caching:- When the entire page output is stored into memory location this is called output caching.

<%output cache dureation="n"
varybyparam="name/parameter name"
diskcacheable="true/false" location="client/server/
server and client/any/none" varybycustom="browser"
varybyheader="accept-language"%>

place the above code snippet in source of the website.
dipa ahuja replied to Mahesh B on 03-Feb-12 05:18 AM

What is Caching?

Caching is a technique of persisting the data in memory for immediate access to requesting program calls. Many in the developer community consider caching as one of the features available to improve performance of Web applications.

Why Caching?

Consider a page that has list of Employee name, contact numbers and mail-Ids of existing employees of a company on an intranet accessible by all employees. This is very useful information that is available throughout the company and could also be one of the most accessed pages. The functionality of adding, updating or deleting is usually less intensive compared to more transaction-based systems like Purchase ordering, Voucher creation etc http://www.c-sharpcorner.com/UploadFile/vishnuprasad2005/ImplementingCachinginASP.NET11302005072210AM/ImplementingCachinginASP.NET.aspx