Redis 命令手册索引
优质
小牛编辑
136浏览
2023-12-01
本文是 Redis Command Reference(redis.io/commands) 的简体中文翻译版,原文十一个部分、共一百多个命令已经全部翻译完毕。
本文所有示例代码均经过 Redis 2.6 版本测试,质量保证。
Key(键)
- DEL
- KEYS
- RANDOMKEY
- TTL
- PTTL
- EXISTS
- MOVE
- RENAME
- RENAMENX
- TYPE
- EXPIRE
- PEXPIRE
- EXPIREAT
- PEXPIREAT
- PERSIST
- SORT
- OBJECT
- MIGRATE
- DUMP
- RESTORE
String(字符串)
- SET
- SETNX
- SETEX
- PSETEX
- SETRANGE
- MSET
- MSETNX
- APPEND
- GET
- MGET
- GETRANGE
- GETSET
- STRLEN
- DECR
- DECRBY
- INCR
- INCRBY
- INCRBYFLOAT
- SETBIT
- GETBIT
- BITOP
- BITCOUNT
Hash(哈希表)
- HSET
- HSETNX
- HMSET
- HGET
- HMGET
- HGETALL
- HDEL
- HLEN
- HEXISTS
- HINCRBY
- HINCRBYFLOAT
- HKEYS
- HVALS
List(列表)
- LPUSH
- LPUSHX
- RPUSH
- RPUSHX
- LPOP
- RPOP
- BLPOP
- BRPOP
- LLEN
- LRANGE
- LREM
- LSET
- LTRIM
- LINDEX
- LINSERT
- RPOPLPUSH
- BRPOPLPUSH
Set(集合)
- SADD
- SREM
- SMEMBERS
- SISMEMBER
- SCARD
- SMOVE
- SPOP
- SRANDMEMBER
- SINTER
- SINTERSTORE
- SUNION
- SUNIONSTORE
- SDIFF
- SDIFFSTORE
有序集(Sorted set)
- ZADD
- ZREM
- ZCARD
- ZCOUNT
- ZSCORE
- ZINCRBY
- ZRANGE
- ZREVRANGE
- ZRANGEBYSCORE
- ZREVRANGEBYSCORE
- ZRANK
- ZREVRANK
- ZREMRANGEBYRANK
- ZREMRANGEBYSCORE
- ZINTERSTORE
- ZUNIONSTORE
Pub/Sub(发布/订阅)
- PUBLISH
- SUBSCRIBE
- PSUBSCRIBE
- UNSUBSCRIBE
- PUNSUBSCRIBE
Transaction(事务)
- WATCH
- UNWATCH
- MULTI
- DISCARD
- EXEC
Script(脚本)
- EVAL
- EVALSHA
- SCRIPT LOAD
- SCRIPT EXISTS
- SCRIPT KILL
- SCRIPT FLUSH
Connection(连接)
- AUTH
- PING
- SELECT
- ECHO
- QUIT
Server(服务器)
- TIME
- DBSIZE
- BGREWRITEAOF
- BGSAVE
- SAVE
- LASTSAVE
- SLAVEOF
- FLUSHALL
- FLUSHDB
- SHUTDOWN
- SLOWLOG
- INFO
- CONFIG GET
- CONFIG SET
- CONFIG RESETSTAT
- DEBUG OBJECT
- DEBUG SEGFAULT
- MONITOR
- SYNC
- CLIENT LIST
- CLIENT KILL