Skip to main content
DevTools24

Redis 命令构建器

可视化构建 Redis 命令。生成字符串、哈希、列表、集合和有序集合的命令。

SET
Set string value
GET
Get string value
MSET
Set multiple keys
MGET
Get multiple keys
INCR
Increment integer value
INCRBY
Increment by value
DECR
Decrement integer value
APPEND
Append to string
STRLEN
Get string length
SETEX
Set with expiration
Select a command from the list
redis-cli -h localhost -p 6379

Redis 命令 - 技术详情

Redis 是一个用作缓存和消息代理的内存数据结构存储。主要数据类型:字符串(GET/SET)、哈希(HGET/HSET)、列表(LPUSH/RPOP)、集合(SADD/SMEMBERS)和有序集合(ZADD/ZRANGE)。使用 EXPIRE 设置 TTL。

命令行替代方案

# Common Redis operations
SET user:1 '{"name":"John"}' EX 3600
HSET user:1:profile name John age 30
LPUSH queue:jobs job1 job2

参考

查看官方规范