await redis.hset("my-key", "my-field", "my-value"); await redis.hexpire("my-key", "my-field", 10); const ttl = await redis.httl("my-key", "my-field"); console.log(ttl); // e.g., [9]
Retrieves the remaining time-to-live (TTL) for field(s) in a hash in seconds.
-2
-1
Was this page helpful?