Data structures, persistence, and the patterns behind Redis as cache, queue, and store.
Preview — first 3 of 105 cards
Strings
Binary-safe byte strings up to 512MB. GET/SET, INCR/INCRBY (atomic), SETNX (set if not exists), SETEX (with TTL), MGET/MSET. Foundation for counters, locks, caching. INCR works on 64-bit signed integers only.
SET key value EX 60 NX
INCR counter
MGET a b c
Hashes
Field-value maps (listpack/hash table since Redis 7). HSET/HGET/HGETALL/HINCRBY/HMGET. Efficient partial updates for objects; HEXPIRE (7.4) sets TTLs on individual fields. Avoid HGETALL on huge hashes.
HSET user:1 name Ada age 30
HINCRBY user:1 age 1
HMGET user:1 name age
CONFIG GET hash-max-listpack-entries
Lists
Doubly linked lists of strings (quicklist of listpacks since Redis 7). LPUSH/RPUSH/LPOP/RPOP/LRANGE/LLEN/LTRIM. Queues, stacks, recent-N lists; blocking pops (BLPOP/BRPOP) and LMOVE/BLMOVE for reliable moves.
LPUSH q job1 job2
RPOP q
LRANGE q 0 -1
BLPOP q 5
102 more cards in this sheet
Unlock the Backend, Databases & AI bundle — ₹399
One-time payment. Unlocks this sheet and 14 other sheets in the bundle, plus a typeset PDF of each.
Unlock the bundle
See all bundles
Or get all 76 sheets for ₹999 — one payment, every future sheet included.