Wednesday, 23 April 2014

What is Cache in Asp.Net and how many types of Caches in Asp.net

                     Programmed memory area for storing some results are called Caching.
It is  increase the performance of the application, By avoiding processing. Caching effects integrity if not handled properly.
                      There are three types of Caching

  1. Page Out Put Caching
  2. Data Caching
  3. Fragment Caching
  • Page Out put Caching :  In this Caching we cache the entire processed page out put. When a user makes request for a page it will be processed and the stores results of that entire page in cache for specific duration. During this time any request will be served from cache. Once the time is elapsed the cache page is removed and next request is processed and cached. This cycle continues for a page resulting in good performance.
                                               First and second requests are automatically maintained by server. But for caching request we have to explicitly cache a page using a directive.
<%@ outputcache Duration=n VaryByparam="none/value">
  • Data Caching :  
               *  This is implemented using "Cache Object"
               *  It is good replacement for application variables/state
               *  All drawbacks of application variables are resolved using Cache Object.
  • Fragment Caching :  Fragment Caching means Partial page out put caching. It is a concept but not a command or directive for implementing. We will use the existing concept like Output cache directive and web user control in order to implement this type of caching.

No comments:

Post a Comment