BB.Caching.Cache.Shared.Strings.GetSet C# (CSharp) Method

GetSet() public static method

Atomically sets key to value and returns the old value stored at key. Returns an error when key exists but does not hold a string value.
http://redis.io/commands/getset
public static GetSet ( RedisKey key, RedisValue value ) : RedisValue
key RedisKey /// The key. ///
value RedisValue /// The value. ///
return RedisValue
                public static RedisValue GetSet(RedisKey key, RedisValue value)
                {
                    RedisValue result = SharedCache.Instance.GetWriteConnection(key)
                        .GetDatabase(SharedCache.Instance.Db)
                        .StringGetSet(key, value);

                    return result;
                }

Same methods

Cache.Shared.Strings::GetSet ( RedisKey key, RedisValue value, System.TimeSpan expire ) : RedisValue