Search Results for

    Show / Hide Table of Contents
    View Source

    Class PublishedContentTypeCache

    Represents a content type cache.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.PublishedCache
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class PublishedContentTypeCache : IPublishedContentTypeCache
    Remarks

    This cache is not snapshotted, so it refreshes any time things change.

    Constructors

    View Source

    PublishedContentTypeCache(IContentTypeService?, IMediaTypeService?, IMemberTypeService?, IPublishedContentTypeFactory, ILogger<PublishedContentTypeCache>)

    Declaration
    public PublishedContentTypeCache(IContentTypeService? contentTypeService, IMediaTypeService? mediaTypeService, IMemberTypeService? memberTypeService, IPublishedContentTypeFactory publishedContentTypeFactory, ILogger<PublishedContentTypeCache> logger)
    Parameters
    Type Name Description
    IContentTypeService contentTypeService
    IMediaTypeService mediaTypeService
    IMemberTypeService memberTypeService
    IPublishedContentTypeFactory publishedContentTypeFactory
    ILogger<PublishedContentTypeCache> logger

    Methods

    View Source

    ClearAll()

    Clears all cached content types.

    Declaration
    public void ClearAll()
    View Source

    ClearByDataTypeId(int)

    Clears all cached content types referencing a data type.

    Declaration
    public IEnumerable<IPublishedContentType> ClearByDataTypeId(int id)
    Parameters
    Type Name Description
    int id

    The data type id to remove content types by

    Returns
    Type Description
    IEnumerable<IPublishedContentType>

    The removed content types

    View Source

    ClearContentType(int)

    Clears a cached content type.

    Declaration
    public void ClearContentType(int id)
    Parameters
    Type Name Description
    int id

    An identifier.

    View Source

    ClearContentTypes(IEnumerable<int>)

    Clears cached content types.

    Declaration
    public void ClearContentTypes(IEnumerable<int> ids)
    Parameters
    Type Name Description
    IEnumerable<int> ids

    ContentType IDs to clear

    View Source

    ClearDataType(int)

    Clears all cached content types referencing a data type.

    Declaration
    public void ClearDataType(int id)
    Parameters
    Type Name Description
    int id

    A data type identifier.

    View Source

    Get(PublishedItemType, Guid)

    Gets a published content type.

    Declaration
    public IPublishedContentType Get(PublishedItemType itemType, Guid key)
    Parameters
    Type Name Description
    PublishedItemType itemType

    An item type.

    Guid key

    An key.

    Returns
    Type Description
    IPublishedContentType

    The published content type corresponding to the item key.

    View Source

    Get(PublishedItemType, int)

    Gets a published content type.

    Declaration
    public IPublishedContentType Get(PublishedItemType itemType, int id)
    Parameters
    Type Name Description
    PublishedItemType itemType

    An item type.

    int id

    An identifier.

    Returns
    Type Description
    IPublishedContentType

    The published content type corresponding to the item type and identifier.

    View Source

    Get(PublishedItemType, string)

    Gets a published content type.

    Declaration
    public IPublishedContentType Get(PublishedItemType itemType, string alias)
    Parameters
    Type Name Description
    PublishedItemType itemType

    An item type.

    string alias

    An alias.

    Returns
    Type Description
    IPublishedContentType

    The published content type corresponding to the item type and alias.

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