/// <summary> /// Configures the back plate for the cache manager. /// <para> /// The <paramref name="redisConfigurationId"/> is used to define the redis configuration, /// the back plate should use to connect to the redis server. /// </para> /// <para> /// If a back plate is defined, at least one cache handle must be marked as back plate /// source. The cache manager then will try to synchronize multiple instances of the same configuration. /// </para> /// </summary> /// <param name="part">The part.</param> /// <param name="redisConfigurationId"> /// The id of the configuration the back plate should use. /// </param> /// <returns>The builder instance.</returns> public static ConfigurationBuilderCachePart WithRedisBackPlate(this ConfigurationBuilderCachePart part, string redisConfigurationId) { if (part == null) { throw new ArgumentNullException("part"); } return(part.WithBackPlate <RedisCacheBackPlate>(redisConfigurationId)); }
/// <summary> /// Configures a cache back-plate for the cache manager. /// The <paramref name="redisConfigurationKey"/> is used to find a matching redis configuration. /// <para> /// If a back plate is defined, at least one cache handle must be marked as back plate /// source. The cache manager then will try to synchronize multiple instances of the same configuration. /// </para> /// </summary> /// <param name="part">The builder instance.</param> /// <param name="redisConfigurationKey"> /// The redis configuration key will be used to find a matching redis connection configuration. /// </param> /// <param name="channelName">The pub sub channel name the back plate should use.</param> /// <returns>The builder instance.</returns> /// <exception cref="ArgumentNullException">Thrown if <paramref name="redisConfigurationKey"/> is null.</exception> public static ConfigurationBuilderCachePart WithRedisBackPlate(this ConfigurationBuilderCachePart part, string redisConfigurationKey, string channelName) { NotNull(part, nameof(part)); return(part.WithBackPlate(typeof(RedisCacheBackPlate), redisConfigurationKey, channelName)); }
#pragma warning disable SA1625 /// <summary> /// Configures a cache back-plate for the cache manager. /// The <paramref name="redisConfigurationKey"/> is used to find a matching redis configuration. /// <para> /// If a back plate is defined, at least one cache handle must be marked as back plate /// source. The cache manager then will try to synchronize multiple instances of the same configuration. /// </para> /// </summary> /// <param name="part">The builder instance.</param> /// <param name="redisConfigurationKey"> /// The redis configuration key will be used to find a matching redis connection configuration. /// </param> /// <returns>The builder instance.</returns> /// <exception cref="ArgumentNullException">Thrown if <paramref name="redisConfigurationKey"/> is null.</exception> public static ConfigurationBuilderCachePart WithRedisBackPlate(this ConfigurationBuilderCachePart part, string redisConfigurationKey) { NotNull(part, nameof(part)); return(part.WithBackPlate <RedisCacheBackPlate>(redisConfigurationKey)); }