adding an event
This commit is contained in:
@@ -858,6 +858,8 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
Notify<IContentType>(_contentStore, payloads, RefreshContentTypesLocked);
|
||||
Notify<IMediaType>(_mediaStore, payloads, RefreshMediaTypesLocked);
|
||||
|
||||
OnNotified(new NotifiedEventArgs<ContentTypeCacheRefresher.JsonPayload>(payloads));
|
||||
|
||||
if (_publishedModelFactory.IsLiveFactory())
|
||||
{
|
||||
//In the case of Pure Live - we actually need to refresh all of the content and the media
|
||||
|
||||
@@ -1,11 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Umbraco.Core.Models.Membership;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
using Umbraco.Web.Cache;
|
||||
|
||||
namespace Umbraco.Web.PublishedCache
|
||||
{
|
||||
abstract class PublishedSnapshotServiceBase : IPublishedSnapshotService
|
||||
internal class NotifiedEventArgs<T> : EventArgs
|
||||
{
|
||||
public NotifiedEventArgs(T[] payloads)
|
||||
{
|
||||
Payloads = payloads;
|
||||
}
|
||||
|
||||
public T[] Payloads { get; }
|
||||
}
|
||||
|
||||
internal abstract class PublishedSnapshotServiceBase : IPublishedSnapshotService
|
||||
{
|
||||
protected PublishedSnapshotServiceBase(IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor)
|
||||
{
|
||||
@@ -38,5 +49,8 @@ namespace Umbraco.Web.PublishedCache
|
||||
|
||||
public virtual void Dispose()
|
||||
{ }
|
||||
|
||||
protected void OnNotified(NotifiedEventArgs<ContentTypeCacheRefresher.JsonPayload> args) => Notified?.Invoke(this, args);
|
||||
public event EventHandler<NotifiedEventArgs<ContentTypeCacheRefresher.JsonPayload>> Notified;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user