Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anton 135 posts 186 karma points
    May 14, 2012 @ 00:21
    Anton
    0

    Add usercontrol result to Umbraco cache

    How I can add usercontrol result to Umbraco cache? I want to add result of my usercontrol that exsist in dashboard

  • Lee Kelleher 3945 posts 15163 karma points MVP 10x admin c-trib
    May 14, 2012 @ 12:36
    Lee Kelleher
    1

    Hi Anton,

    You can do this by using ASP.NET's own caching mechanism; by adding this line to the your ASCX user-control:

    <%@ OutputCache Duration="120" %>

    Change the "Duration" to however many seconds that you'd like to cache it for.

    More details on MSDN: here and here.

    Cheers, Lee.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies