Example #1
0
        /// <summary>
        /// Get Storage
        /// </summary>
        /// <param name="name">Cache Name</param>
        /// <param name="parameters">Storage Parameters</param>
        /// <returns>Storage instance</returns>
        public IStorageAsync GetStorage(string name, KeyValueCollection parameters)
        {
            var connectionString = parameters?.FirstOrDefault(p => p.Key == "ConnectionString")?.Value;

            if (connectionString == null)
            {
                throw new ArgumentNullException("ConnectionString", "The RedisCache doesn't have the ConnectionString parameter");
            }
            return(new RedisCacheClient(connectionString, name));
        }