LPUSH jobs pending-1 pending-2Redis Data Types Cheat Sheet
High-value Redis commands for lists, sets, hashes, and sorted sets used in queues, objects, tags, and leaderboards.
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all
Lists
Queues, stacks, blocking pops, and range access.
bash
bash
RPUSH jobs pending-1 pending-2bash
LPOP jobsbash
RPOP jobsBlocking pop from one or more lists
Wait up to 30 seconds for a new element.
bashANYredislistblocking
bash
BLPOP jobs urgent:jobs 30bash
BRPOP jobs 30bash
LLEN jobsbash
LRANGE jobs 0 9bash
LINDEX jobs 0bash
LSET jobs 0 urgent-1bash
LTRIM jobs 0 99bash
LREM jobs 0 duplicate-jobbash
RPOPLPUSH source processingMove between lists with direction control
Generalized replacement for RPOPLPUSH.
bashANYredislistworkflow
bash
LMOVE source destination RIGHT LEFTbash
BLMOVE source destination RIGHT LEFT 30bash
LPOS jobs urgent-1Sets
Membership, uniqueness, intersections, and set algebra.
bash
SADD tags:post:1 redis cache databasebash
SREM tags:post:1 cachebash
SMEMBERS tags:post:1bash
SCARD tags:post:1bash
SISMEMBER tags:post:1 redisbash
SMISMEMBER tags:post:1 redis cache nosqlbash
SPOP queue:set 2bash
SRANDMEMBER queue:set 3bash
SMOVE online-users offline-users user:1bash
SUNION set:a set:bbash
SINTER set:a set:bbash
SDIFF set:a set:bbash
SUNIONSTORE result:set set:a set:bStore intersection result
Write the intersection into a destination set.
bashANYredissetintersection
bash
SINTERSTORE result:set set:a set:bbash
SDIFFSTORE result:set set:a set:bbash
SSCAN tags:post:1 0 MATCH re* COUNT 100Hashes
Field/value structures for objects and sparse records.
bash
HSET user:1 name Alice email alice@example.combash
HGET user:1 namebash
HMGET user:1 name emailbash
HGETALL user:1bash
HKEYS user:1bash
HVALS user:1bash
HLEN user:1bash
HEXISTS user:1 emailbash
HDEL user:1 email phonebash
HINCRBY counters:api hits 1bash
HINCRBYFLOAT account:1 balance 9.99bash
HSETNX user:1 created_at 2026-03-06bash
HRANDFIELD user:1 2 WITHVALUESbash
HSCAN user:1 0 MATCH meta:* COUNT 100bash
HSTRLEN user:1 nameSorted sets
Ranked data, leaderboards, and range queries by score or rank.
bash
ZADD leaderboard 100 alice 95 bobbash
ZSCORE leaderboard alicebash
ZINCRBY leaderboard 10 alicebash
ZRANGE leaderboard 0 9 WITHSCORESbash
ZREVRANGE leaderboard 0 9 WITHSCORESbash
ZRANGEBYSCORE leaderboard 90 100 WITHSCORESbash
ZREVRANGEBYSCORE leaderboard +inf 90 WITHSCORESbash
ZRANK leaderboard alicebash
ZREVRANK leaderboard alicebash
ZREM leaderboard bobbash
ZREMRANGEBYRANK leaderboard 0 -101bash
ZREMRANGEBYSCORE leaderboard -inf 49Count members in score range
Count how many members fall within a score range.
bashANYrediszsetcount
bash
ZCOUNT leaderboard 80 100bash
ZCARD leaderboardStore union of sorted sets
Combine multiple sorted sets into a destination key.
bashANYrediszsetunion
bash
ZUNIONSTORE combined 2 board:daily board:weeklyStore intersection of sorted sets
Intersect sorted sets into a destination key.
bashANYrediszsetintersection
bash
ZINTERSTORE common 2 board:a board:bIncrementally scan a sorted set
Cursor-based scan over zset members and scores.
bashANYrediszsetscan
bash
ZSCAN leaderboard 0 MATCH a* COUNT 100More in Redis
Redis Persistence, Replication, and Cluster Cheat Sheet
RDB, AOF, replication, failover, Lua scripts, functions, and cluster command references for operational Redis use.
Redis Admin and redis-cli Cheat Sheet
redis-cli operational workflows, latency inspection, slowlog, config, ACL, clients, and safe administrative controls.
Redis Transactions, Pub/Sub, and Streams Cheat Sheet
Atomic transactions, optimistic locking, pub/sub messaging, streams, consumer groups, geo commands, bitmaps, and HyperLogLog.
Redis Cheat Sheet
Comprehensive Redis commands for redis-cli, key lifecycle, strings, expiration, and core operational workflows.