Closed macchmie3 closed 5 years ago
Yes, you can just "reference" a connection string by name
var cache = CacheFactory.Build(c => c.WithRedisCacheHandle("fromConnectionStrings"));
And CacheManager should load that from your app.config.
Yes I understand - the thing is I do not want to reference connection string, but use it directly - like
var cache = CacheFactory.Build(c => c.WithRedisCacheHandle("localhost:6379,ssl=false,allowAdmin=true,syncTimeout=3000"));
That's where you use the normal .WithRedisConfiguration("key", "connectionstring")
method to configure Redis...
Hi, Im currently configuring cache as follows:
var cache= CacheFactory.Build(settings => { settings.WithJsonSerializer() .WithSystemRuntimeCacheHandle("InProcessCache") .And .WithRedisBackplane("RedisConnection") .WithRedisCacheHandle("RedisConnection") .WithExpiration(ExpirationMode.Sliding, TimeSpan.FromMinutes(15)); });
Is there a way to not use names of app.config connection strings like "RedisConnection" in this example, but to use directly a connection string like "localhost:6379,ssl=false,allowAdmin=true,syncTimeout=3000"? This is troubling me as I would like to retieve the connectionstring from a safe keyvault storage, and not store the connection in app.config.