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