Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IPublishedContentCache

    Namespace: Umbraco.Cms.Core.PublishedCache
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IPublishedContentCache : IPublishedCache

    Methods

    View Source

    GetByIdAsync(Guid, bool?)

    Gets a content identified by its unique identifier.

    Declaration
    Task<IPublishedContent?> GetByIdAsync(Guid key, bool? preview = null)
    Parameters
    Type Name Description
    Guid key

    The content unique identifier.

    bool? preview

    A value indicating whether to consider unpublished content.

    Returns
    Type Description
    Task<IPublishedContent>

    The content, or null.

    Remarks

    Considers published or unpublished content depending on defaults.

    View Source

    GetByIdAsync(int, bool?)

    Gets a content identified by its unique identifier.

    Declaration
    Task<IPublishedContent?> GetByIdAsync(int id, bool? preview = null)
    Parameters
    Type Name Description
    int id

    The content unique identifier.

    bool? preview

    A value indicating whether to consider unpublished content.

    Returns
    Type Description
    Task<IPublishedContent>

    The content, or null.

    Remarks

    Considers published or unpublished content depending on defaults.

    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX