key
callback
回傳集合中的成員數量,key不存在則回傳0。
client.del('food'); const arr = ['apple', 'potato', 'apple', 'onion', 'potato', 'onion'] client.sadd('food', arr); client.scard('food', redis.print);
Reply: 3
Last updated 3 years ago
Was this helpful?