Exemplo n.º 1
0
        public RedisLocationCache(ILogger <RedisLocationCache> logger,
                                  StackExchange.Redis.IConnectionMultiplexer connectionMultiplexer)
        {
            this.logger     = logger;
            this.connection = connectionMultiplexer;

            logger.LogInformation($"Using redis location cache - {connectionMultiplexer.Configuration}");
        }
 public static void AddConnection(string connectionString, StackRedis.IConnectionMultiplexer connection)
 {
     lock (connectLock)
     {
         if (!connections.ContainsKey(connectionString))
         {
             connections.Add(connectionString, connection);
         }
     }
 }