How do you implement the custom output caching?

 Posted by Tripati_tutu on 10/25/2010 | Category: ASP.NET Interview questions | Views: 2586 | Points: 40

Create a custom output-cache provider as a class that derives from the new System.Web.Caching.OutputCacheProvider type. You can then configure the provider in the Web.config file by using the new providers subsection of the outputCache element, as shown below:


<outputCache defaultProvider="AspNetInternalProvider">
<add name="DiskCache"
type="Test.OutputCacheEx.DiskOutputCacheProvider, DiskCacheProvider"/>

Then specify the newly created and configured custom cache provider as below:
<%@ OutputCache Duration="60" VaryByParam="None" providerName="DiskCache" %>

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Chvrsri on: 12/15/2010 | Points: 10
Under which tag this <caching> is to be placed ?

Login to post response