Class ElementContainerDeletedDistributedCacheNotificationHandler
Invalidates element caches when an element container (folder) is deleted, so that its key→id mapping is evicted from IIdKeyMap on every server.
Inheritance
object
DeletedDistributedCacheNotificationHandlerBase<EntityContainer, EntityContainerDeletedNotification, EntityContainer>
Namespace: Umbraco.Cms.Core.Cache
Assembly: Umbraco.Core.dll
Syntax
public sealed class ElementContainerDeletedDistributedCacheNotificationHandler : DeletedDistributedCacheNotificationHandlerBase<EntityContainer, EntityContainerDeletedNotification>, IDistributedCacheNotificationHandler<EntityContainerDeletedNotification>, INotificationHandler<EntityContainerDeletedNotification>, IDistributedCacheNotificationHandler, INotificationHandler
Remarks
Element container deletions only publish EntityContainerDeletedNotification and an ElementTreeChangeNotification for the contained elements - never for the container node itself, so without this handler the container's stale id/key mapping survives until the next app restart (see #23072).
Constructors
View SourceElementContainerDeletedDistributedCacheNotificationHandler(DistributedCache)
Initializes a new instance of the ElementContainerDeletedDistributedCacheNotificationHandler class.
Declaration
public ElementContainerDeletedDistributedCacheNotificationHandler(DistributedCache distributedCache)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributedCache | distributedCache | The distributed cache. |
Methods
View SourceHandle(IEnumerable<EntityContainer>, IDictionary<string, object?>)
Handles the specified entities.
Declaration
protected override void Handle(IEnumerable<EntityContainer> entities, IDictionary<string, object?> state)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<EntityContainer> | entities | The entities. |
| IDictionary<string, object> | state | The notification state. |