Redis
Lists Commands
Implement queues, stacks, and timelines with Redis lists. Learn LPUSH, RPOP, and blocking operations for message queues and activity feeds.
8 commands
Pro Tips
Use LPUSH + RPOP for FIFO queue, LPUSH + LPOP for LIFO stack behavior.
BRPOP blocks until an element is available - perfect for worker queues without polling.
LRANGE key -10 -1 gets the last 10 elements - useful for recent activity feeds.
Common Mistakes
Lists with millions of items can slow down. Use LTRIM to cap list size for bounded queues.