Set key to hold the string value with expiration time in seconds
method
RedisClient.setex
Referenced types
type KeyLike = string | ArrayBufferView | Blob
method
Set key to hold the string value with expiration time in seconds
The key to set
The expiration time in seconds
The value to set
Promise that resolves with "OK" on success
await redis.setex("mykey", 10, "Hello");
// Key will expire after 10 seconds