Using Redis to Go

Redis to Go is a hosted Redis database solution. After you provision the Redis to Go add-on and re-deploy your application, you can fetch the Redis url from the <appSettings/> section of your "Web.config" file. The setting we inject is called REDISTOGO_URL. This is how you would read the string:

var redisUrl = ConfigurationManager.AppSettings.Get("REDISTOGO_URL");

Using ServiceStack.Redis (available from NuGet, make sure you have version 3.6.9 or newer):

var connectionUri = new Uri(redisUrl);
using (var redis = new RedisClient(connectionUri))
    redis.Set("hello", "world");
    var value = redis.Get<string>("hello");

Using Booksleeve (available from NuGet):

var connectionUri = new Uri(redisUrl);
var password = connectionUri.UserInfo.Split(':').LastOrDefault();
using (var conn = new RedisConnection(connectionUri.Host, port: connectionUri.Port, password: password))

Recent Discussions

31 Jan, 2019 12:55 AM
29 Jan, 2019 03:57 AM
15 Jan, 2019 03:40 PM
02 Jan, 2019 07:21 PM
24 Dec, 2018 11:08 AM