const classredis::RedisClient
sys::Obj redis::RedisClient
Redis client.
- close
Void close()Close this client all connections if applicable.
- del
Delete the given key value.
- expire
Void expire(Str key, Duration timeout)Expire given key after given
timeouthas elasped, where timeout must be in even second intervals.- expireAt
Void expireAt(Str key, DateTime timestamp)Expire given key when the given
timestamphas been reached, wheretimestamphas a resolution of whole seconds.- get
Get the value for given key.
- hdel
Delete given hash field for key.
- hget
Get the hash field for given key.
- hgetall
Get all hash field values for given key.
- hmget
Str?[] hmget(Str key, Str[] fields)Get the hash field for given key.
- hmset
Void hmset(Str key, Str:Obj vals)Set all hash values in
valsfor given key.- host
const Str hostHost name of Redis server.
- hset
Void hset(Str key, Str field, Obj val)Set the hash field to the given value for key.
- invoke
Invoke the given command and return response.
- make
new make(Str host, Int port := 6379)Create a new client instance for given host and port.
- memStats
Returns information about the memory usage of server.
- pipeline
Obj?[] pipeline(Obj[] invokes)Pipeline multiple invoke requests and return batched results.
- port
const Int portPort number of Redis server.
- set
Set the given key to value.