Pages

Men

rh

6/23/2012

Caching in Asp.Net

What is Caching
Caching:-
Caching is the technique widely used in computing to increase the performance of application by keeping frequently accessing memory or data.

What are all types of Caching Techniques available?
  • Output Caching
  • Fragment Caching
  • Data Caching
Output Caching:-
Caches the dynamic output generated by request. Some time it is useful to cache the the output of website event for a minute which will result in best performance.

For caching the whole page, the page should be have out put cache directive.

<% @ Output cache "duration= "120"  VarybyParam ="State"  %>

Fragment Caching:-
Caching the some portion of the page generated by request. Sometime it is not practical to cache the entire page. In such cases we can cache a some portin of the page.

Data Caching:-
Caches the object programatically.
Ex:- Cache ["State"] = dsstates;

No comments :

Post a Comment