Interface IApiPublishedContentCache
Defines a cache for accessing published content through the Delivery API.
Namespace: Umbraco.Cms.Core.DeliveryApi
Assembly: Umbraco.Core.dll
Syntax
public interface IApiPublishedContentCache
Methods
View SourceGetById(Guid)
Gets published content by its unique identifier.
Declaration
IPublishedContent? GetById(Guid contentId)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | contentId | The content's unique identifier. |
Returns
| Type | Description |
|---|---|
| IPublishedContent | The published content, or |
GetByIdAsync(Guid)
Asynchronously gets published content by its unique identifier.
Declaration
Task<IPublishedContent?> GetByIdAsync(Guid contentId)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | contentId | The content's unique identifier. |
Returns
| Type | Description |
|---|---|
| Task<IPublishedContent> | A task containing the published content, or |
GetByIds(IEnumerable<Guid>)
Gets multiple published content items by their unique identifiers.
Declaration
IEnumerable<IPublishedContent> GetByIds(IEnumerable<Guid> contentIds)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<Guid> | contentIds | The content unique identifiers. |
Returns
| Type | Description |
|---|---|
| IEnumerable<IPublishedContent> | The published content items that were found. |
GetByIdsAsync(IEnumerable<Guid>)
Asynchronously gets multiple published content items by their unique identifiers.
Declaration
Task<IEnumerable<IPublishedContent>> GetByIdsAsync(IEnumerable<Guid> contentIds)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<Guid> | contentIds | The content unique identifiers. |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<IPublishedContent>> | A task containing the published content items that were found. |
GetByRoute(string)
Gets published content by its route.
Declaration
IPublishedContent? GetByRoute(string route)
Parameters
| Type | Name | Description |
|---|---|---|
| string | route | The content route. |
Returns
| Type | Description |
|---|---|
| IPublishedContent | The published content, or |
GetByRouteAsync(string)
Asynchronously gets published content by its route.
Declaration
Task<IPublishedContent?> GetByRouteAsync(string route)
Parameters
| Type | Name | Description |
|---|---|---|
| string | route | The content route. |
Returns
| Type | Description |
|---|---|
| Task<IPublishedContent> | A task containing the published content, or |