Copied to clipboard

Flag this post as spam?

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


  • Matthieu Nelmes 102 posts 385 karma points
    Nov 18, 2015 @ 15:54
    Matthieu Nelmes
    1

    SaveAndPublishWithStatus not updating XML cache?

    I have a scenario where content can be updated via a SurfaceController.

    Am using the ContentService and setting appropriate values, then saving with SaveAndPublishWithStatus(content)

    In the backoffice the content get's updated however on the frontend is still showing the old version, either after refresh. Appears to be a caching issue and I'm assuming we're still seeing the XML cached version because if we then re-publish via the backoffice then the changes are reflected on the frontend.

    We've tried a variety of SaveAndPublishWithStatus/PublishWithStatus and also legacy methods to force refresh of the cache but nothing appears to be working

  • James 251 posts 1169 karma points
    Nov 18, 2015 @ 16:11
    James
    1

    Hello,

    Had a look around and found an article on Stack overflow that had been answered which looks like the same issue as yours:

    http://stackoverflow.com/questions/21681631/umbraco-contentservice-not-updating-checboxlist-in-document-cache

    also : https://our.umbraco.org/documentation/reference/management/services/contentservice

    Hope that helps! It looks like contentService.Publish(document); might do it?

    Cheers, J

  • Matthieu Nelmes 102 posts 385 karma points
    Nov 18, 2015 @ 16:29
    Matthieu Nelmes
    0

    Thanks James,

    It was a weird one and we tried all varieties of solutions because from what we could see, the code "should have" worked.

    After closing VS and rebooting the machine it magically started working!

  • James 251 posts 1169 karma points
    Nov 18, 2015 @ 19:44
    James
    0

    If in doubt switch it off and back on again.... !

Please Sign in or register to post replies

Write your reply to:

Draft