Ejemplo n.º 1
0
        public RedisUploader()
        {
            var configurationOptions = new ConfigurationOptions
            {
                EndPoints = { "localhost" }
            };

            lazyConnection = new Lazy <ConnectionMultiplexer>(() => ConnectionMultiplexer.Connect(configurationOptions));
            dbContext      = new RedisAppContext();
        }
Ejemplo n.º 2
0
        public ValuesController(RedisAppContext dbContext)
        {
            var configurationOptions = new ConfigurationOptions
            {
                EndPoints       = { "localhost" },
                ConnectTimeout  = 60000,
                ResponseTimeout = 60000,
                SyncTimeout     = 60000
            };

            lazyConnection = new Lazy <ConnectionMultiplexer>(() => ConnectionMultiplexer.Connect(configurationOptions));
            this.dbContext = dbContext;
            server         = lazyConnection.Value.GetServer("localhost:6379");
        }