Copied to clipboard

Flag this post as spam?

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


  • lucuma 261 posts 563 karma points
    Mar 22, 2011 @ 23:43
    lucuma
    0

    Cache by Page

    I've read some various Cache postings here that others have had but they haven't helped me with my issue.  I assume that if I set my macro to Cache Duration 90 seconds and Cache by Page = true/checked then my user control should cache itself and then display itself the exact same way for 90 seconds before caching again.  

    IF this assumption is true, then what I'm actually seeing is my page loading fine the first time and then the 2nd time it is completely blank.  When cache expiration expires, it reloads fine the first time and then is blank the remaing times.  Is this a bug?  I have a rather heavy DB operation that I need to cache but the macro cache doesn't seem to work at all.  Any help?

    This is what happens when it fails after the initial successful load:

    ItemRendererError rendering control ContentPlaceHolderDefault_cp_content_ctl00_ctl00 of Item 1 (NodeId '' : bodyText).
    Object reference not set to an instance of an object.
      at System.Web.UI.Page.BeginFormRender(HtmlTextWriter writer, String formUniqueID)
      at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
      at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
      at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
      at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
      at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
      at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
      at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
      at umbraco.presentation.templateControls.Macro.Render(HtmlTextWriter writer)
      at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
      at umbraco.presentation.templateControls.ItemRenderer.Render(Item item, HtmlTextWriter writer)
  • lucuma 261 posts 563 karma points
    Mar 24, 2011 @ 19:52
    lucuma
    0

    Is this just my misunderstanding of how macro caching is supposed to work?

  • Rich Green 2246 posts 4008 karma points
    Mar 24, 2011 @ 21:20
    Rich Green
    0

    Your logic seems fine. 

    Not sure what to suggest, how about outputting a date time to the page, at least then you can see if cache is working?

    Not sure about your error though...

    Rich

Please Sign in or register to post replies

Write your reply to:

Draft