//Create new DocumentObject Document doc =newDocument(id); //Mark the document for publish under Admin account doc.Publish(newUser(0)); //Publish the document by Updating umbraco.config file library.UpdateDocumentCache(doc.Id);
The scenario where I am not seeing it update immediately is when attaching a Comment to an Item in the CMS and it is the first comment to be attached, which creates a node for the comments as well as the comment itself. The comment is not immediately retrievable from the Cache. It works fine for all subsequent comments though.
UpdateDocumentCache not updating in certain circumstances
I'm following the code from this wiki entry:
http://our.umbraco.org/wiki/reference/umbracolibrary/updatedocumentcache
The scenario where I am not seeing it update immediately is when attaching a Comment to an Item in the CMS and it is the first comment to be attached, which creates a node for the comments as well as the comment itself. The comment is not immediately retrievable from the Cache. It works fine for all subsequent comments though.
Any ideas?
is working on a reply...