• CacheManager
  • Documentation
  • Api Docs
  • MichaCo.net
    Show / Hide Table of Contents

    Class RedisCacheBackplane

    Implementation of the cache backplane using a Redis Pub/Sub channel.

    Redis Pub/Sub is used to send messages to the redis server on any key change, cache clear, region clear or key remove operation. Every cache manager with the same configuration subscribes to the same channel and can react on those messages to keep other cache handles in sync with the 'master'.

    Inheritance
    Object
    CacheBackplane
    RedisCacheBackplane
    Inherited Members
    CacheBackplane.CacheConfiguration
    CacheBackplane.ConfigurationKey
    CacheBackplane.Dispose()
    CacheBackplane.TriggerChanged(String, CacheItemChangedEventAction)
    CacheBackplane.TriggerChanged(String, String, CacheItemChangedEventAction)
    CacheBackplane.TriggerCleared()
    CacheBackplane.TriggerClearedRegion(String)
    CacheBackplane.TriggerRemoved(String)
    CacheBackplane.TriggerRemoved(String, String)
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace:CacheManager.Redis
    Assembly:CacheManager.StackExchange.Redis.dll
    Syntax
    public sealed class RedisCacheBackplane : CacheBackplane, IDisposable
    Remarks

    The cache manager must have at least one cache handle configured with IsBackplaneSource set to true. Usually this is the redis cache handle, if configured. It should be the distributed and bottom most cache handle.

    Constructors

    | Improve this Doc View Source

    RedisCacheBackplane(ICacheManagerConfiguration, ILoggerFactory)

    Initializes a new instance of the RedisCacheBackplane class.

    Declaration
    public RedisCacheBackplane(ICacheManagerConfiguration configuration, ILoggerFactory loggerFactory)
    Parameters
    Type Name Description
    ICacheManagerConfiguration configuration

    The cache manager configuration.

    ILoggerFactory loggerFactory

    The logger factory

    Methods

    | Improve this Doc View Source

    Dispose(Boolean)

    Releases unmanaged and - optionally - managed resources.

    Declaration
    protected override void Dispose(bool managed)
    Parameters
    Type Name Description
    Boolean managed

    true to release both managed and unmanaged resources; false to release only unmanaged resources.

    Overrides
    CacheBackplane.Dispose(Boolean)
    | Improve this Doc View Source

    NotifyChange(String, CacheItemChangedEventAction)

    Notifies other cache clients about a changed cache key.

    Declaration
    public override void NotifyChange(string key, CacheItemChangedEventAction action)
    Parameters
    Type Name Description
    String key

    The key.

    CacheItemChangedEventAction action

    The cache action.

    Overrides
    CacheBackplane.NotifyChange(String, CacheItemChangedEventAction)
    | Improve this Doc View Source

    NotifyChange(String, String, CacheItemChangedEventAction)

    Notifies other cache clients about a changed cache key.

    Declaration
    public override void NotifyChange(string key, string region, CacheItemChangedEventAction action)
    Parameters
    Type Name Description
    String key

    The key.

    String region

    The region.

    CacheItemChangedEventAction action

    The cache action.

    Overrides
    CacheBackplane.NotifyChange(String, String, CacheItemChangedEventAction)
    | Improve this Doc View Source

    NotifyClear()

    Notifies other cache clients about a cache clear.

    Declaration
    public override void NotifyClear()
    Overrides
    CacheBackplane.NotifyClear()
    | Improve this Doc View Source

    NotifyClearRegion(String)

    Notifies other cache clients about a cache clear region call.

    Declaration
    public override void NotifyClearRegion(string region)
    Parameters
    Type Name Description
    String region

    The region.

    Overrides
    CacheBackplane.NotifyClearRegion(String)
    | Improve this Doc View Source

    NotifyRemove(String)

    Notifies other cache clients about a removed cache key.

    Declaration
    public override void NotifyRemove(string key)
    Parameters
    Type Name Description
    String key

    The key.

    Overrides
    CacheBackplane.NotifyRemove(String)
    | Improve this Doc View Source

    NotifyRemove(String, String)

    Notifies other cache clients about a removed cache key.

    Declaration
    public override void NotifyRemove(string key, string region)
    Parameters
    Type Name Description
    String key

    The key.

    String region

    The region.

    Overrides
    CacheBackplane.NotifyRemove(String, String)
    • Improve this Doc
    • View Source
    © 2025 by Michael Conrad. All rights reserved. - MichaCo.net