Copied to clipboard

Flag this post as spam?

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


  • Thomas Dolberg 74 posts 95 karma points
    Nov 20, 2011 @ 15:52
    Thomas Dolberg
    0

    Refresh cached macro serverside

    Hi,

     

    sometimes I need to refresh the contents of a cached macro before it expires. I don't see any refresh-method on the macro-control itself. How do I then remove the macro from the cache programmatically? Using umbdebugshowtrace=true, I can see the key for the macro, but is it possible to get the key programmatically somehow?

     

    thanks

    Thomas

  • Thomas 49 posts 78 karma points c-trib
    Nov 20, 2011 @ 18:42
    Thomas
    0

    Hi - try this: 

    new umbraco.macro(Id).removeFromCache();

    You can find the Id if you hover over the Macro in the Umbraco admin (shows bottom left/right in your browser).

     

  • 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