Class ElementContainerCacheRefresher
Provides cache refresh functionality for element containers (folders).
Inheritance
Namespace: Umbraco.Cms.Core.Cache
Assembly: Umbraco.Core.dll
Syntax
public sealed class ElementContainerCacheRefresher : PayloadCacheRefresherBase<ElementContainerCacheRefresherNotification, ElementContainerCacheRefresher.JsonPayload>, IPayloadCacheRefresher<ElementContainerCacheRefresher.JsonPayload>, IJsonCacheRefresher, ICacheRefresher, IDiscoverable
Remarks
A deleted container's node id is never reused, so its key→id mapping in IIdKeyMap must be evicted on every server. Otherwise a container recreated under the same key resolves to the stale id and the element tree's children query returns nothing until the next app restart. This refresher only evicts the id/key map - element data is unaffected by container changes, so it deliberately avoids the broader invalidation performed by ElementCacheRefresher.
Constructors
View SourceElementContainerCacheRefresher(AppCaches, IJsonSerializer, IIdKeyMap, IEventAggregator, ICacheRefresherNotificationFactory)
Initializes a new instance of the ElementContainerCacheRefresher class.
Declaration
public ElementContainerCacheRefresher(AppCaches appCaches, IJsonSerializer serializer, IIdKeyMap idKeyMap, IEventAggregator eventAggregator, ICacheRefresherNotificationFactory factory)
Parameters
| Type | Name | Description |
|---|---|---|
| AppCaches | appCaches | |
| IJsonSerializer | serializer | |
| IIdKeyMap | idKeyMap | |
| IEventAggregator | eventAggregator | |
| ICacheRefresherNotificationFactory | factory |
Fields
View SourceUniqueId
Represents a unique identifier for the 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(ElementContainerCacheRefresher.JsonPayload[] payloads)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonPayload[] | payloads | The payload. |
RefreshAll()
Refreshes all entities.
Declaration
public override void RefreshAll()
Remove(int)
Removes an entity.
Declaration
public override void Remove(int id)
Parameters
| Type | Name | Description |
|---|---|---|
| int | id | The entity's identifier. |