Class PublishedCacheBase
Inheritance
object
Namespace: Umbraco.Cms.Core.PublishedCache
Assembly: Umbraco.Core.dll
Syntax
public abstract class PublishedCacheBase : IPublishedCache
Constructors
View SourcePublishedCacheBase(IVariationContextAccessor, bool)
Declaration
public PublishedCacheBase(IVariationContextAccessor variationContextAccessor, bool previewDefault)
Parameters
| Type | Name | Description |
|---|---|---|
| IVariationContextAccessor | variationContextAccessor | |
| bool | previewDefault |
Properties
View SourcePreviewDefault
Declaration
public bool PreviewDefault { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceGetAtRoot(bool, string?)
Declaration
public abstract IEnumerable<IPublishedContent> GetAtRoot(bool preview, string? culture = null)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | preview | |
| string | culture |
Returns
| Type | Description |
|---|---|
| IEnumerable<IPublishedContent> |
GetById(bool, Guid)
Gets a content identified by its unique identifier.
Declaration
public abstract IPublishedContent? GetById(bool preview, Guid contentId)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | preview | A value indicating whether to consider unpublished content. |
| Guid | contentId | The content unique identifier. |
Returns
| Type | Description |
|---|---|
| IPublishedContent | The content, or null. |
Remarks
The value of preview overrides defaults.
GetById(bool, int)
Gets a content identified by its unique identifier.
Declaration
public abstract IPublishedContent? GetById(bool preview, int contentId)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | preview | A value indicating whether to consider unpublished content. |
| int | contentId | The content unique identifier. |
Returns
| Type | Description |
|---|---|
| IPublishedContent | The content, or null. |
Remarks
The value of preview overrides defaults.
GetById(Guid)
Gets a content identified by its unique identifier.
Declaration
public IPublishedContent? GetById(Guid contentId)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | contentId | The content unique identifier. |
Returns
| Type | Description |
|---|---|
| IPublishedContent | The content, or null. |
Remarks
Considers published or unpublished content depending on defaults.
GetById(int)
Gets a content identified by its unique identifier.
Declaration
public IPublishedContent? GetById(int contentId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | contentId | The content unique identifier. |
Returns
| Type | Description |
|---|---|
| IPublishedContent | The content, or null. |
Remarks
Considers published or unpublished content depending on defaults.
HasById(bool, int)
Declaration
public abstract bool HasById(bool preview, int contentId)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | preview | |
| int | contentId |
Returns
| Type | Description |
|---|---|
| bool |
HasById(int)
Declaration
public bool HasById(int contentId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | contentId |
Returns
| Type | Description |
|---|---|
| bool |