/// <summary>
        /// Adds a redis configuration with the given <paramref name="configurationKey"/>.
        /// </summary>
        /// <param name="part">The builder instance.</param>
        /// <param name="configurationKey">
        /// The configuration key which can be used to refernce this configuration by a redis cache handle or backplane.
        /// </param>
        /// <param name="connectionString">The redis connection string.</param>
        /// <param name="database">The redis database to be used.</param>
        /// <param name="enableKeyspaceNotifications">
        /// Enables keyspace notifications to react on eviction/expiration of items.
        /// Make sure that all servers are configured correctly and 'notify-keyspace-events' is at least set to 'Exe', otherwise CacheManager will not retrieve any events.
        /// See <see href="https://redis.io/topics/notifications#configuration"/> for configuration details.
        /// </param>
        /// <returns>The configuration builder.</returns>
        /// <exception cref="System.ArgumentNullException">
        /// If <paramref name="configurationKey"/> or <paramref name="connectionString"/> are null.
        /// </exception>
        public static ConfigurationBuilderCachePart WithRedisConfiguration(this ConfigurationBuilderCachePart part, string configurationKey, string connectionString, int database = 0, bool enableKeyspaceNotifications = false)
        {
            Guard.NotNullOrWhiteSpace(configurationKey, nameof(configurationKey));

            Guard.NotNullOrWhiteSpace(connectionString, nameof(connectionString));

            RedisConfigurations.AddConfiguration(new RedisConfiguration(configurationKey, connectionString, database, enableKeyspaceNotifications));
            return(part);
        }
        /// <summary>
        /// Adds a redis configuration with the given <paramref name="configurationKey"/>.
        /// </summary>
        /// <param name="part">The builder instance.</param>
        /// <param name="configurationKey">
        /// The configuration key which can be used to refernce this configuration by a redis cache handle or backplane.
        /// </param>
        /// <param name="configuration">The redis configuration object.</param>
        /// <returns>The configuration builder.</returns>
        /// <exception cref="System.ArgumentNullException">If <paramref name="configuration"/> or <paramref name="configurationKey"/> are null.</exception>
        public static ConfigurationBuilderCachePart WithRedisConfiguration(this ConfigurationBuilderCachePart part, string configurationKey, Action <RedisConfigurationBuilder> configuration)
        {
            Guard.NotNull(configuration, nameof(configuration));

            var builder = new RedisConfigurationBuilder(configurationKey);

            configuration(builder);
            RedisConfigurations.AddConfiguration(builder.Build());
            return(part);
        }