Class DataTypeCacheRefresher
Cache refresher for data type caches.
Inheritance
Namespace: Umbraco.Cms.Core.Cache
Assembly: Umbraco.Core.dll
Syntax
public sealed class DataTypeCacheRefresher : PayloadCacheRefresherBase<DataTypeCacheRefresherNotification, DataTypeCacheRefresher.JsonPayload>, IPayloadCacheRefresher<DataTypeCacheRefresher.JsonPayload>, IJsonCacheRefresher, ICacheRefresher, IDiscoverable
Constructors
View SourceDataTypeCacheRefresher(AppCaches, IJsonSerializer, IIdKeyMap, IEventAggregator, ICacheRefresherNotificationFactory, IPublishedModelFactory, IPublishedContentTypeFactory, IPublishedContentTypeCache, IDocumentCacheService, IMediaCacheService)
Initializes a new instance of the DataTypeCacheRefresher class.
Declaration
[Obsolete("Use the non-obsolete constructor instead. Scheduled for removal in Umbraco 18.")]
public DataTypeCacheRefresher(AppCaches appCaches, IJsonSerializer serializer, IIdKeyMap idKeyMap, IEventAggregator eventAggregator, ICacheRefresherNotificationFactory factory, IPublishedModelFactory publishedModelFactory, IPublishedContentTypeFactory publishedContentTypeFactory, IPublishedContentTypeCache publishedContentTypeCache, IDocumentCacheService documentCacheService, IMediaCacheService mediaCacheService)
Parameters
| Type | Name | Description |
|---|---|---|
| AppCaches | appCaches | The application caches. |
| IJsonSerializer | serializer | The JSON serializer. |
| IIdKeyMap | idKeyMap | The ID-key mapping service. |
| IEventAggregator | eventAggregator | The event aggregator. |
| ICacheRefresherNotificationFactory | factory | The cache refresher notification factory. |
| IPublishedModelFactory | publishedModelFactory | The published model factory. |
| IPublishedContentTypeFactory | publishedContentTypeFactory | The published content type factory. |
| IPublishedContentTypeCache | publishedContentTypeCache | The published content type cache. |
| IDocumentCacheService | documentCacheService | The document cache service. |
| IMediaCacheService | mediaCacheService | The media cache service. |
DataTypeCacheRefresher(AppCaches, IJsonSerializer, IIdKeyMap, IEventAggregator, ICacheRefresherNotificationFactory, IPublishedModelFactory, IPublishedContentTypeFactory, IPublishedContentTypeCache, IDocumentCacheService, IMediaCacheService, IContentTypeCommonRepository)
Initializes a new instance of the DataTypeCacheRefresher class.
Declaration
public DataTypeCacheRefresher(AppCaches appCaches, IJsonSerializer serializer, IIdKeyMap idKeyMap, IEventAggregator eventAggregator, ICacheRefresherNotificationFactory factory, IPublishedModelFactory publishedModelFactory, IPublishedContentTypeFactory publishedContentTypeFactory, IPublishedContentTypeCache publishedContentTypeCache, IDocumentCacheService documentCacheService, IMediaCacheService mediaCacheService, IContentTypeCommonRepository contentTypeCommonRepository)
Parameters
| Type | Name | Description |
|---|---|---|
| AppCaches | appCaches | The application caches. |
| IJsonSerializer | serializer | The JSON serializer. |
| IIdKeyMap | idKeyMap | The ID-key mapping service. |
| IEventAggregator | eventAggregator | The event aggregator. |
| ICacheRefresherNotificationFactory | factory | The cache refresher notification factory. |
| IPublishedModelFactory | publishedModelFactory | The published model factory. |
| IPublishedContentTypeFactory | publishedContentTypeFactory | The published content type factory. |
| IPublishedContentTypeCache | publishedContentTypeCache | The published content type cache. |
| IDocumentCacheService | documentCacheService | The document cache service. |
| IMediaCacheService | mediaCacheService | The media cache service. |
| IContentTypeCommonRepository | contentTypeCommonRepository | The content type common repository. |
Fields
View SourceUniqueId
The unique identifier for this cache refresher.
Declaration
public static readonly Guid UniqueId
Field Value
| Type | Description |
|---|---|
| Guid |
Properties
View SourceName
Gets the name of the refresher.
Declaration
public override string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
RefresherUniqueId
Gets the unique identifier of the refresher.
Declaration
public override Guid RefresherUniqueId { get; }
Property Value
| Type | Description |
|---|---|
| Guid |
Methods
View SourceRefresh(Guid)
Refreshes an entity.
Declaration
public override void Refresh(Guid id)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | id | The entity's identifier. |
Refresh(int)
Refreshes an entity.
Declaration
public override void Refresh(int id)
Parameters
| Type | Name | Description |
|---|---|---|
| int | id | The entity's identifier. |
Refresh(JsonPayload[])
Refreshes as specified by a payload.
Declaration
public override void Refresh(DataTypeCacheRefresher.JsonPayload[] payloads)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonPayload[] | payloads | The payload. |
RefreshAll()
Refreshes all entities.
Declaration
public override void RefreshAll()
RefreshInternal(JsonPayload[])
Performs internal cache refresh operations for the specified payloads.
Declaration
public override void RefreshInternal(DataTypeCacheRefresher.JsonPayload[] payloads)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonPayload[] | payloads | The payloads to process. |
Remove(int)
Removes an entity.
Declaration
public override void Remove(int id)
Parameters
| Type | Name | Description |
|---|---|---|
| int | id | The entity's identifier. |