Copied to clipboard

Flag this post as spam?

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


  • David North 2 posts 22 karma points
    Jul 16, 2010 @ 12:40
    David North
    0

    Caching in a macro

    I'm having real problem with caching in a macro. I've set the cache period to 0 but still a dropdownlist that returns a list of other items in the content tree won't update until I force the application to recycle e.g. touch the web.config file.

    The Macro uses umbraco.content.Instance.XmlContent.SelectSingleNode to select a parent node and then loops through the children and adds these to the dropdownlist.

    When I add a new child to this node it doesn't appear in the dropdownlist even if I publish the entire website again.

    I'm not sure where this caching is taking place. Can anyone point me in the right direction?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jul 16, 2010 @ 13:02
    Matt Brailsford
    0

    Hey David.

    Hav you also un-checked "Cache by page" and "Cache personalized" on your macro?

    Matt

  • David North 2 posts 22 karma points
    Jul 16, 2010 @ 14:10
    David North
    0

    Hi Matt

    I've tried all possible combinations!

    Dave

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jul 16, 2010 @ 14:20
    Matt Brailsford
    0

    Hey Dave,

    You may want to look at using some of the umbraco.library methods for accessing your data, rather than querying the in memory instance directly. Not sure whether this will solve your issue, but worth a try

    http://our.umbraco.org/wiki/reference/umbracolibrary

    I'd be looking at

    • GetXmlNodeById
    • GetXmlNodeByXPath
    • GetXmlNodeCurrent

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft