Umbraco 4.8在umbraco.cms.businesslogic.web.Document.Publish方法中有错误吗?我尝试编辑一个节点,保存并发布一个节点。我可以在BackOffice中查看节点是否已正确更改。在网页中,我使用razor来渲染为HTML。此cshtml文件使用umbrac.MacroEngines.DynamicNode。此节点版本返回旧值。然后,在BackOffice中,我尝试点击“保存并发布”,然后网页呈现正确的数据。
发布于 2012-09-14 01:16:03
DynamicNode从umbraco.config缓存中访问节点的信息,而不是直接访问数据库(参见Difference between Node and Document)。保存和发布不会自行更新缓存,还有一个额外的步骤。示例:
Document document = new Document(1234);
document.Text = "New Title";
document.Publish(User.GetUser(0));
umbraco.library.UpdateDocumentCache(document.Id);有关更多详细信息,请参阅Publishing and republishing。
https://stackoverflow.com/questions/12411374
复制相似问题