Copied to clipboard

Flag this post as spam?

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


  • wilmar 19 posts 129 karma points
    Feb 11, 2021 @ 11:36
    wilmar
    0

    Why is IPublishedCache returning null ??

    im using this method to read content as IPublishedContent

    _context.UmbracoContext.Content.GetById(IContent.key)
    

    but sometimes this method returns null or wierd errors ? when the object is actually published an stored in database. i need to read content and the nested childs And IContent doesent provide any Extensions to read
    Descendants. How is this cached updated ? How can i work with live data and their realeted Descendants? Im following this example enter image description here

    but is use this code on ContentService_Published event https://our.umbraco.com/documentation/getting-started/Code/Subscribing-To-Events/

Please Sign in or register to post replies

Write your reply to:

Draft