Congratulations to all the winners of April 2013, they have won INR 3400 cash and INR 20147 worth prizes !
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 3481 |  Welcome, Guest!   Register  Login
 Home > Interview Questions > ASP.NET Interview Questions > How do you implement the custom output c ...

How do you implement the custom output caching?

Interview question and answer by: Tripati_tutu | Posted on: 10/25/2010 | Category: ASP.NET Interview questions | Views: 1444 | | Points: 40


Answer:

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:

 <caching>

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


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 
Found interesting? Add this to:


 Responses

Posted by: Chvrsri | Posted on: 15 Dec 2010 05:17:25 AM | Points: 10 | Alert Moderator 

Under which tag this <caching> is to be placed ?

>> Write Response - Respond to this post and get points

Even more ... | Submit Interview Questions and win prizes!

More Interview Questions from Tripati_tutu

Even more ... | Submit Interview Questions and win prizes!


About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/19/2013 7:42:28 AM