这篇的整理是对《redis中各种数据类型对应的jedis操作命令、redis命令大全》的一个补充!
方法 | 说明 | 详细链接 |
---|---|---|
persist | 用于移除给定 key 的过期时间,使得 key 永不过期。 | |
pexpire | 用于设定键有效期. | http://www.yiibai.com/redis/keys_expire.html |
expireAt | 用来以Unix时间戳格式设置键的到期时间。 | http://www.yiibai.com/redis/keys_expireat.html |
pexpireAt | 命令用于设置 key 的过期时间,以毫秒计。 | http://www.runoob.com/redis/keys-pexpireat.html |
pttl | 获取键以毫秒为单位的到期剩余时间。 | http://www.yiibai.com/redis/keys_pttl.html |
setbit | 对 key 所储存的字符串值,设置或清除指定偏移量上的位(bit). | http://www.runoob.com/redis/strings-setbit.html |
getbit | 对 key 所储存的字符串值,获取指定偏移量上的位(bit)。 | http://www.runoob.com/redis/strings-getbit.html |
setrange | 用 value 参数覆写(overwrite)给定 key 所储存的字符串值,从偏移量 offset 开始。 | http://doc.redisfans.com/string/setrange.html |
psetex | 用于设置key的值,随着时间以毫秒为单位过期。 | http://www.yiibai.com/redis/strings_psetex.html |
strlen | 用于获取存储在key字符串值的长度。当key持有非字符串值则返回一个错误。 | http://www.yiibai.com/redis/strings_strlen.html |
zrange | 返回有序集中,指定区间内的成员。 | http://www.runoob.com/redis/sorted-sets-zrange.html |
zrevrange | 返回存储在键的排序元素集合在指定的范围。该元素被认为是从最高到最低得分排序。降字典顺序用于以相等的分数的元素。 | http://www.yiibai.com/redis/sorted_sets_zrevrange.html |
zlexcount | 在计算有序集合中指定字典区间内成员数量。 | http://www.runoob.com/redis/sorted-sets-zlexcount.html |
linsert | 插入值在存储在key之前或参考值支点后。如果key不存在,它被认为是一个空列表,并没有进行任何操作。当存在key但不持有列表值,则返回一个错误。 | http://www.yiibai.com/redis/lists_linsert.html |
lpushx | 插入存储在列表的头部的键值,仅当键已经存在,并持有(它是)列表. | http://www.yiibai.com/redis/lists_lpushx.html |
bitcount | 计算给定字符串中,被设置为 1 的比特位的数量。 | http://redis.readthedocs.io/en/2.6/string/bitcount.html |
scan | 是一个基于游标的迭代器 | http://doc.redisfans.com/key/scan.html |
bitpos | 返回字符串里面第一个被设置为1或者0的bit位。 | http://www.redis.cn/commands/bitpos.html |
pfadd | 将所有元素的参数保存在指定为第一个参数的键名的HyperLogLog数据结构。 | http://www.yiibai.com/redis/hyperloglog_pfadd.html |
renamenx | 用来改变一个键的名称,如果新的键不存在。 | http://www.yiibai.com/redis/keys_renamenx.html |
brpoplpush | 用于从列表中弹出一个值,它推到另一个列表并返回它,或阻塞直到有可用。BRPOPLPUSH命令只返回最后一个元素,并插入到另一个列表中,如果有的话,或阻止客户端对指定的时间执行任意命令。 | http://www.yiibai.com/redis/lists_brpoplpush.html |
publish | 发布 | |
subscribe | 订阅 | |
bitop | 对一个或多个保存二进制位的字符串 key 进行位元操作,并将结果保存到 destkey 上 | http://doc.redisfans.com/string/bitop.html |
pfcount | 返回给定 HyperLogLog 的基数估算值。 | http://www.runoob.com/redis/hyperloglog-pfcount.html |
evalsha | 根据给定的 sha1 校验码,执行缓存在服务器中的脚本 | http://www.runoob.com/redis/scripting-evalsha.html |
scriptExists | 返回缓存脚本存在信息 | http://www.yiibai.com/redis/scripting_script_exists.html |
scriptLoad | 加载脚本到脚本的缓存,但不执行它。经过指定的命令加载到缓存中的脚本使用EVALSHA与脚本的正确SHA1摘要,类似EVAL第一次成功调用后,会再调用。该脚本可以保证永远留在缓存中的脚本(除非脚本FLUSH被调用)。该命令以同样的方式工作,即使脚本是已经存在于脚本缓存 | http://www.yiibai.com/redis/scripting_script_load.html |
GEO | Redis 的 GEO 特性将在 Redis 3.2 版本释出, 这个功能可以将用户给定的地理位置信息储存起来, 并对这些信息进行操作。 | |
geoadd | ||
georadius |