SCARD returns the cardinality (the number of elements) in the set at key. Cost is O(size) / 1 WCU per 4KB of data counted. Works similar to https://redis.io/commands/scard
(key string)
| 60 | // |
| 61 | // Works similar to https://redis.io/commands/scard |
| 62 | func (c Client) SCARD(key string) (count int64, err error) { |
| 63 | return c.HLEN(key) |
| 64 | } |
| 65 | |
| 66 | func (c Client) SDIFF(key string, subtractKeys ...string) (members []string, err error) { |
| 67 | memberSet := make(map[string]struct{}) |