Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/ttl.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ async function main() {

await redis.persist("foo"); // Remove the existing timeout on key "foo"
console.log(await redis.ttl("foo")); // -1

await redis.hset("foo", "bar", "foobar");
await redis.hexpire("foo", 10, "FIELDS", 1, "bar"); // Add TTL to hset field
}

main();
Loading