Class PublishedContentTypeCache
Represents a content type cache.
Inheritance
System.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 SourcePublishedContentTypeCache(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 SourceClearAll()
Clears all cached content types.
Declaration
public void ClearAll()
ClearByDataTypeId(Int32)
Declaration
public IEnumerable<IPublishedContentType> ClearByDataTypeId(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id |
Returns
Type | Description |
---|---|
IEnumerable<IPublishedContentType> |
ClearContentType(Int32)
Clears a cached content type.
Declaration
public void ClearContentType(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | An identifier. |
ClearContentTypes(IEnumerable<Int32>)
Declaration
public void ClearContentTypes(IEnumerable<int> ids)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.Int32> | ids |
ClearDataType(Int32)
Clears all cached content types referencing a data type.
Declaration
public void ClearDataType(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | A data type identifier. |
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. |
Get(PublishedItemType, Int32)
Gets a published content type.
Declaration
public IPublishedContentType Get(PublishedItemType itemType, int id)
Parameters
Type | Name | Description |
---|---|---|
PublishedItemType | itemType | An item type. |
System.Int32 | id | An identifier. |
Returns
Type | Description |
---|---|
IPublishedContentType | The published content type corresponding to the item type and identifier. |
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. |
System.String | alias | An alias. |
Returns
Type | Description |
---|---|
IPublishedContentType | The published content type corresponding to the item type and alias. |