Skip to content

Commit

Permalink
Add GetConfig/SetConfig overloads to RedisClient
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed May 30, 2013
1 parent d9a75b3 commit 697522a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/ServiceStack.Redis/RedisClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,25 @@ public TimeSpan GetTimeToLive(string key)
return TimeSpan.FromSeconds(Ttl(key));
}

public void SetConfig(string configItem, string value)
{
base.ConfigSet(configItem, value.ToUtf8Bytes());
}

public string GetConfig(string configItem)
{
var sb = new StringBuilder();
var byteArray = base.ConfigGet(configItem);
foreach (var bytes in byteArray)
{
if (sb.Length > 0)
sb.Append(" ");

sb.Append(bytes.FromUtf8Bytes());
}
return sb.ToString();
}

[Obsolete("Renamed to 'As'")]
public IRedisTypedClient<T> GetTypedClient<T>()
{
Expand Down

0 comments on commit 697522a

Please sign in to comment.