Copied to clipboard

Flag this post as spam?

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


  • Carl Sjöholm 18 posts 189 karma points
    1 week ago
    Carl Sjöholm
    0

    Update ContentCache for a single item

    Hi,

    I know there have been similar questions around. But I cannot find the answer to what I'm looking for.

    How do you refresh/update the ContentCache for a single item?

    The only thing I found so far is this for republishing. But this is the entire tree.

    using (var client = new HttpClient()) { client.GetStringAsync("/Umbraco/dialogs/republish.aspx?xml=true") }

    Using ApplicationContext.Current.Services.ContentService.SaveAndPublishWithStatus(content);

    Doesn't seem to work all times. We use a scheduled task to create/update items from a PIM system. And there are duplicate items when there should be none since we are updating/creating by a unique name.

Please Sign in or register to post replies

Write your reply to:

Draft