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:
ItemRenderer
Error 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)
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:
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)
Is this just my misunderstanding of how macro caching is supposed to work?
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
is working on a reply...