key
callback
刪除並回傳key對應串列最後一個元素。
刪除並回傳key對應串列中第一個元素。
client.rpush('uid:3', 'U001', 'U002', 'U003','U004', 'U005'); client.lrange('uid:3', 0, -1, redis.print); client.rpop('uid:3', (err, popItem) => { console.log(popItem); }); client.lrange('uid:3', 0, -1, redis.print);
Reply: U001,U002,U003,U004,U005 U005 Reply: U001,U002,U003,U004
Last updated 3 years ago
Was this helpful?