Trim a list to the specified range
await redis.lpush("key", "a", "b", "c", "d"); await redis.ltrim("key", 1, 2); // the list is now ["b", "c"]
The key of the list.
The index of the first element to keep.
OK
Was this page helpful?