RoboZhando/Redis/Serialize/RedisConvert.cs
/// <summary>
/// Writes a hashmap to the redis
/// </summary>
/// <param name="name"></param>
/// <param name="values"></param>
/// <param name="TTL"></param>
/// <returns></returns>
Writes a hashmap to the redis
Writes a hashmap to the redis
public async Task WriteHashMapAsync(Namespace name, Dictionary<string, string> values, TimeSpan? TTL = null)
        {
            var key = name.Build();
            var conn = Transaction ?? (IRedisConnection)Client;
            await conn.StoreHashMapAsync(key, values);
            if (TTL.HasValue) await conn.SetExpiryAsync(key, TTL.Value);
        }
public async Task WriteHashMapAsync ( Namespace name , Dictionary < string , string > values , TimeSpan ? TTL = null ) { var key = name . Build ( ) ; var conn = Transaction ?? ( IRedisConnection ) Client ; await conn . StoreHashMapAsync ( key , values ) ; if ( TTL . HasValue ) await conn . SetExpiryAsync ( key , TTL . Value ) ; }
Writes a hashmap to the redis
Writes a hashmap to the redis
None
name
Namespace
None
values
Dictionary<string, string>
None
TTL
TimeSpan?
None