const length1 = await redis.lpush("key", "a", "b", "c"); 
console.log(length1); // 3
const length2 = await redis.lpush("key", "d"); 
console.log(length2); // 4

Arguments

key
string
required

The key of the list.

elements
...TValue[]
required

One or more elements to push at the head of the list.

Response

The length of the list after the push operation.

const length1 = await redis.lpush("key", "a", "b", "c"); 
console.log(length1); // 3
const length2 = await redis.lpush("key", "d"); 
console.log(length2); // 4