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 4026 posts 15836 karma points MVP 13x 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.

Please Sign in or register to post replies

Write your reply to:

Draft