Redis的一些命令 SISMEMBER

SISMEMBER

SISMEMBER key member

Returns if member is a member of the set stored at key.

INCRBY

INCRBY key increment

将存储在 key 中的数字增加 increment 值。如果 key 不存在,则在执行操作之前将其设置为 0。如果 key 包含错误类型的值或包含无法表示为整数的字符串,则会返回错误。此操作仅限于 64 位有符号整数。
Increments the number stored at key by increment. If the key does not exist, it is set to 0 before performing the operation. An error is returned if the key contains a value of the wrong type or contains a string that can not be represented as integer. This operation is limited to 64 bit signed integers.

See INCR for extra information on increment/decrement operations.

SADD

https://redis.io/docs/latest/commands/sadd/

SADD key member [member ...]

将指定的成员添加到存储在 key 处的集合中。如果指定的成员已经是该集合的成员,则将被忽略。如果 key 不存在,则系统会先创建一个新集合,然后再添加指定的成员。
Add the specified members to the set stored at key. Specified members that are already a member of this set are ignored. If key does not exist, a new set is created before adding the specified members.

如果存储在 key 处的值不是集合,则会返回错误。
An error is returned when the value stored at key is not a set.

posted @ 2025-04-14 10:32  kuki'  阅读(27)  评论(0)    收藏  举报