Interface IPublishedCache
Provides access to cached contents.
Namespace: Umbraco.Cms.Core.PublishedCache
Assembly: Umbraco.Core.dll
Syntax
public interface IPublishedCacheMethods
View SourceGetAtRoot(Boolean, String)
Gets contents at root.
Declaration
IEnumerable<IPublishedContent> GetAtRoot(bool preview, string culture = null)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | preview | A value indicating whether to consider unpublished content. | 
| System.String | culture | A culture. | 
Returns
| Type | Description | 
|---|---|
| IEnumerable<IPublishedContent> | The contents. | 
Remarks
The value of preview overrides defaults.
GetAtRoot(String)
Gets contents at root.
Declaration
IEnumerable<IPublishedContent> GetAtRoot(string culture = null)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | culture | A culture. | 
Returns
| Type | Description | 
|---|---|
| IEnumerable<IPublishedContent> | The contents. | 
Remarks
Considers published or unpublished content depending on defaults.
GetById(Guid)
Gets a content identified by its unique identifier.
Declaration
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(Boolean, Guid)
Gets a content identified by its unique identifier.
Declaration
IPublishedContent GetById(bool preview, Guid contentId)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | 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(Boolean, Int32)
Gets a content identified by its unique identifier.
Declaration
IPublishedContent GetById(bool preview, int contentId)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | preview | A value indicating whether to consider unpublished content. | 
| System.Int32 | contentId | The content unique identifier. | 
Returns
| Type | Description | 
|---|---|
| IPublishedContent | The content, or null. | 
Remarks
The value of preview overrides defaults.
GetById(Boolean, Udi)
Gets a content identified by its Udi identifier.
Declaration
IPublishedContent GetById(bool preview, Udi contentId)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | preview | A value indicating whether to consider unpublished content. | 
| Udi | contentId | The content Udi identifier. | 
Returns
| Type | Description | 
|---|---|
| IPublishedContent | The content, or null. | 
Remarks
The value of preview overrides defaults.
GetById(Int32)
Gets a content identified by its unique identifier.
Declaration
IPublishedContent GetById(int contentId)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | contentId | The content unique identifier. | 
Returns
| Type | Description | 
|---|---|
| IPublishedContent | The content, or null. | 
Remarks
Considers published or unpublished content depending on defaults.
GetById(Udi)
Gets a content identified by its unique identifier.
Declaration
IPublishedContent GetById(Udi contentId)Parameters
| Type | Name | Description | 
|---|---|---|
| Udi | contentId | The content unique identifier. | 
Returns
| Type | Description | 
|---|---|
| IPublishedContent | The content, or null. | 
Remarks
Considers published or unpublished content depending on defaults.
HasContent()
Gets a value indicating whether the cache contains published content.
Declaration
bool HasContent()Returns
| Type | Description | 
|---|---|
| System.Boolean | A value indicating whether the cache contains published content. | 
Remarks
Considers published or unpublished content depending on defaults.
HasContent(Boolean)
Gets a value indicating whether the cache contains published content.
Declaration
bool HasContent(bool preview)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | preview | A value indicating whether to consider unpublished content. | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | A value indicating whether the cache contains published content. | 
Remarks
The value of preview overrides defaults.