top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What are the various types of caching in ASP?

+1 vote
33 views
What are the various types of caching in ASP?
posted Sep 22, 2015 by Sathyasree

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

Caching is a technique widely used in computing to increase performance by keeping frequently accessed or expensive data in memory. In the context of a web application, caching retains the pages or data across HTTP requests and reuses them without the expense of recreating them. ASP.NET has 3 kinds of caching, strategiesOutput, CachingFragment and CachingData.

CachingOutput Caching: Caches the dynamic output generated by a request. Some times it is useful to cache the output of a website even for a minute, which will result in a better performance. For caching the entire page the page should have OutputCache directive.<%@ OutputCache Duration="60" VaryByParam="state" %>

Fragment Caching: Caches the portion of the page generated by the request. Some times it is not practical to cache the entire page, in such cases we can cache a portion of page<%@ OutputCache Duration="120" VaryByParam="CategoryID;SelectedID"%>

Data Caching: Caches the objects programmatically. For data caching ASP.Net provides a cache object for eg: cache["States"] = dsStates;

answer Sep 22, 2015 by Shivaranjini
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...