RoboZhando/Redis/Serialize/RedisConvert.cs
/// <summary>
/// Writes a string key pair to the redis. If there is a buffer available then it will write it to the hashmap buffer.
/// </summary>
/// <param name="name">The key to insert</param>
/// <param name="value">The value to insert</param>
/// <param name="TTL">The expiry timespan of the entry</param>
/// <param name="skipBuffer">Skips the buffer and writes directly to the client.</param>
/// <returns></returns>
Writes a string key pair to the redis. If there is a buffer available then it will write it to the hashmap buffer.
Writes a string key pair to the redis . If there is a buffer available then it will write it to the hashmap buffer .
public async Task WriteValueAsync(Namespace name, string value, TimeSpan? TTL = null, bool skipBuffer = false)
        {
            if (_hashmapBuffer != null && !skipBuffer)
            {
                _hashmapBuffer[name.Peek()] = value;
                return;
            }
            var conn = Transaction ?? (IRedisConnection) Client;
            await conn.StoreStringAsync(name.Build(), value, TTL);
        }
public async Task WriteValueAsync ( Namespace name , string value , TimeSpan ? TTL = null , bool skipBuffer = false ) { if ( _hashmapBuffer != null && ! skipBuffer ) { _hashmapBuffer [ name . Peek ( ) ] = value ; return ; } var conn = Transaction ?? ( IRedisConnection ) Client ; await conn . StoreStringAsync ( name . Build ( ) , value , TTL ) ; }
Writes a string key pair to the redis.
Writes a string key pair to the redis .
None
name
Namespace
The key to insert
The key to insert
value
string
The value to insert
The value to insert
TTL
TimeSpan?
The expiry timespan of the entry
The expiry timespan of the entry
skipBuffer
bool
Skips the buffer and writes directly to the client.
Skips the buffer and writes directly to the client .