Class JsonCacheRefresherBase<TNotification, TJsonPayload>
A base class for "json" cache refreshers.
Namespace: Umbraco.Cms.Core.Cache
Assembly: Umbraco.Core.dll
Syntax
public abstract class JsonCacheRefresherBase<TNotification, TJsonPayload> : CacheRefresherBase<TNotification>, IJsonCacheRefresher, ICacheRefresher, IDiscoverable where TNotification : CacheRefresherNotification
Type Parameters
Name | Description |
---|---|
TNotification | |
TJsonPayload |
Remarks
The actual cache refresher type is used for strongly typed events.
Constructors
View SourceJsonCacheRefresherBase(AppCaches, IJsonSerializer, IEventAggregator, ICacheRefresherNotificationFactory)
Initializes a new instance of the
Declaration
protected JsonCacheRefresherBase(AppCaches appCaches, IJsonSerializer jsonSerializer, IEventAggregator eventAggregator, ICacheRefresherNotificationFactory factory)
Parameters
Type | Name | Description |
---|---|---|
AppCaches | appCaches | |
IJsonSerializer | jsonSerializer | |
IEventAggregator | eventAggregator | |
ICacheRefresherNotificationFactory | factory |
Properties
View SourceJsonSerializer
Declaration
protected IJsonSerializer JsonSerializer { get; }
Property Value
Type | Description |
---|---|
IJsonSerializer |
Methods
View SourceDeserialize(String)
Deserializes a json payload into an object payload.
Declaration
public TJsonPayload[] Deserialize(string json)
Parameters
Type | Name | Description |
---|---|---|
System.String | json | The json payload. |
Returns
Type | Description |
---|---|
TJsonPayload[] | The deserialized object payload. |
Refresh(String)
Refreshes as specified by a json payload.
Declaration
public virtual void Refresh(string json)
Parameters
Type | Name | Description |
---|---|---|
System.String | json | The json payload. |
Serialize(TJsonPayload[])
Declaration
public string Serialize(params TJsonPayload[] jsonPayloads)
Parameters
Type | Name | Description |
---|---|---|
TJsonPayload[] | jsonPayloads |
Returns
Type | Description |
---|---|
System.String |