Search Results for

    Show / Hide Table of Contents
    View Source

    Class JsonCacheRefresherBase<TNotification, TJsonPayload>

    A base class for "json" cache refreshers.

    Inheritance
    object
    CacheRefresherBase<TNotification>
    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 Source

    JsonCacheRefresherBase(AppCaches, IJsonSerializer, IEventAggregator, ICacheRefresherNotificationFactory)

    Initializes a new instance of the JsonCacheRefresherBase<TNotification, TJsonPayload> class.

    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 Source

    JsonSerializer

    Gets the JSON serializer.

    Declaration
    protected IJsonSerializer JsonSerializer { get; }
    Property Value
    Type Description
    IJsonSerializer

    Methods

    View Source

    Deserialize(string)

    Deserializes a json payload into an object payload.

    Declaration
    public TJsonPayload[]? Deserialize(string json)
    Parameters
    Type Name Description
    string json

    The json payload.

    Returns
    Type Description
    TJsonPayload[]

    The deserialized object payload.

    View Source

    Refresh(string)

    Refreshes as specified by a json payload.

    Declaration
    public virtual void Refresh(string json)
    Parameters
    Type Name Description
    string json

    The json payload.

    View Source

    RefreshInternal(string)

    Refreshes internal (isolated) caches by a json payload.

    Declaration
    public virtual void RefreshInternal(string json)
    Parameters
    Type Name Description
    string json

    The json payload.

    View Source

    Serialize(params TJsonPayload[])

    Serializes the specified payloads to a JSON string.

    Declaration
    public string Serialize(params TJsonPayload[] jsonPayloads)
    Parameters
    Type Name Description
    TJsonPayload[] jsonPayloads

    The payloads to serialize.

    Returns
    Type Description
    string

    The JSON string representation of the payloads.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX