A grouped, offline Redis command lookup
Redis commands map onto its data structures — strings, hashes, lists, sets and sorted sets — plus a set of generic key commands. This reference lets you search commands by name or description and filter by data structure, showing the syntax, the time complexity and the version each command appeared in. It runs entirely in your browser.
How it works
Each entry lists the command, the data structure it operates on, the syntax with placeholders, the Big-O time complexity and the Redis version it was introduced in. Because Redis executes commands one at a time on a single thread, the time complexity tells you whether a command is safe to run on a large key. A few common patterns:
SET session:42 "{...}" EX 3600 # value + 1-hour TTL atomically
INCR page:views # atomic counter
ZADD leaderboard 99 "alice" # add scored member
ZRANGE leaderboard 0 9 WITHSCORES # top 10 by score
SCAN 0 MATCH user:* COUNT 100 # iterate keys without blocking
Tips and examples
- Prefer
SCANoverKEYSandHSCAN/SSCAN/ZSCANover their bulk equivalents on large keys to avoid blocking the server. - Always set an expiry on cache keys with
EXPIREorSET ... EXso memory does not grow unbounded. - Use
BLPOP/BRPOPto build a simple blocking work queue without polling. - Sorted sets make excellent leaderboards and rate-limiters because score-based
range queries are
O(log N + M).