views:

41

answers:

2

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?

A: 

Try adding ?umbdebug=true or ?umbdebugshowtrace=true to any page on your website, it will display trace/macro information.

This video series, maybe helpful http://umbraco.tv/documentation/videos/for-developers/foundation/macro-caching

Elijah Glover
A: 

Try putting umbraco.library.UpdateDocumentCache(docId); before the SelectSingleNode call and see if it works.

azzlack