Copied to clipboard

Flag this post as spam?

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


  • Pete 152 posts 176 karma points
    Sep 22, 2009 @ 11:53
    Pete
    0

    UpdateDocumentCache not updating in certain circumstances

    I'm following the code from this wiki entry:

    http://our.umbraco.org/wiki/reference/umbracolibrary/updatedocumentcache

    //Create new DocumentObject
    Document doc = new Document(id);
    //Mark the document for publish under Admin account
    doc
    .Publish(new User(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.

     

    Any ideas?

Please Sign in or register to post replies

Write your reply to:

Draft