preCharge Forums - View Single Post - What are different types of caching?
View Single Post
Old 07-31-2006   #2 (permalink)
Nazir
Member
 
Join Date: Jul 2006
Age: 48
Posts: 45
Default Re: What are different types of caching?

In ASP.NET 1.0/1.1 and now in ASP.NET 2.0, developers deal with caching in several ways. First, you can cache an entire HTTP response (the entire Web Page) using a mechanism called output caching. Two other methods are partial page caching and data caching.

Output Caching is a way to keep the dynamically generated page content in the server's memory for later retrieval.

Caching Programmatically: Cache object, you can store and also invalidate items in the cache based on several different dependencies. In ASP.NET 1.0/1.1, the only possible dependencies were the following:

- File-based dependencies
- Key-based dependencies
- Time-based dependencies

When inserting items into the cache using the Cache object. you set the dependencies the Insert method, as shown in the following example:

Cache.Insert("DSN", connectionString, _
New CacheDependency(Server.MapPath("myconfig.xml")))

By using a dependency when the item been referanced changes, you remove the cache for that item from memory.

Cache Dependencies have been improved in ASP.NET 2.0 with the addition of the AggregateCacheDependency class, the newly extendable CacheDependency class, and capability to create your own custom CacheDependency classess.
Nazir is offline   Reply With Quote

 
Credit Cards UK | Repair Bad Credit | Loans | Natures Sunshine Products | Internet Advertising