Search Results for

    Show / Hide Table of Contents
    View Source

    Class CacheRefresherBase<TNotification>

    A base class for cache refreshers that handles events.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Cache
    Assembly: Umbraco.Core.dll
    Syntax
    public abstract class CacheRefresherBase<TNotification> : ICacheRefresher, IDiscoverable where TNotification : CacheRefresherNotification
    Type Parameters
    Name Description
    TNotification
    Remarks

    The actual cache refresher type is used for strongly typed events.

    Constructors

    View Source

    CacheRefresherBase(AppCaches, IEventAggregator, ICacheRefresherNotificationFactory)

    Initializes a new instance of the CacheRefresherBase<TNotification>.

    Declaration
    protected CacheRefresherBase(AppCaches appCaches, IEventAggregator eventAggregator, ICacheRefresherNotificationFactory factory)
    Parameters
    Type Name Description
    AppCaches appCaches
    IEventAggregator eventAggregator
    ICacheRefresherNotificationFactory factory

    Properties

    View Source

    AppCaches

    Gets the cache helper.

    Declaration
    protected AppCaches AppCaches { get; }
    Property Value
    Type Description
    AppCaches
    View Source

    EventAggregator

    Declaration
    protected IEventAggregator EventAggregator { get; }
    Property Value
    Type Description
    IEventAggregator
    View Source

    Name

    Gets the name of the refresher.

    Declaration
    public abstract string Name { get; }
    Property Value
    Type Description
    System.String
    View Source

    NotificationFactory

    Gets the ICacheRefresherNotificationFactory for

    Declaration
    protected ICacheRefresherNotificationFactory NotificationFactory { get; }
    Property Value
    Type Description
    ICacheRefresherNotificationFactory
    View Source

    RefresherUniqueId

    Gets the unique identifier of the refresher.

    Declaration
    public abstract Guid RefresherUniqueId { get; }
    Property Value
    Type Description
    Guid

    Methods

    View Source

    ClearAllIsolatedCacheByEntityType<TEntity>()

    Clears the cache for all repository entities of a specified type.

    Declaration
    protected void ClearAllIsolatedCacheByEntityType<TEntity>()
        where TEntity : class, IEntity
    Type Parameters
    Name Description
    TEntity

    The type of the entities.

    View Source

    OnCacheUpdated(CacheRefresherNotification)

    Raises the CacheUpdated event.

    Declaration
    protected void OnCacheUpdated(CacheRefresherNotification notification)
    Parameters
    Type Name Description
    CacheRefresherNotification notification
    View Source

    Refresh(Guid)

    Refreshes an entity.

    Declaration
    public virtual void Refresh(Guid id)
    Parameters
    Type Name Description
    Guid id

    The entity's identifier.

    View Source

    Refresh(Int32)

    Refreshes an entity.

    Declaration
    public virtual void Refresh(int id)
    Parameters
    Type Name Description
    System.Int32 id

    The entity's identifier.

    View Source

    RefreshAll()

    Refreshes all entities.

    Declaration
    public virtual void RefreshAll()
    View Source

    Remove(Int32)

    Removes an entity.

    Declaration
    public virtual void Remove(int id)
    Parameters
    Type Name Description
    System.Int32 id

    The entity's identifier.

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • CacheRefresherBase(AppCaches, IEventAggregator, ICacheRefresherNotificationFactory)
    • Properties
      • AppCaches
      • EventAggregator
      • Name
      • NotificationFactory
      • RefresherUniqueId
    • Methods
      • ClearAllIsolatedCacheByEntityType<TEntity>()
      • OnCacheUpdated(CacheRefresherNotification)
      • Refresh(Guid)
      • Refresh(Int32)
      • RefreshAll()
      • Remove(Int32)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX