Grokking Redis
0% completed
2.6 Sets
Which users follow both Alice and Bob, and which tags do two articles share? In a typical application you would load two lists into memory and compare them in a loop. In Redis, each question is a single command that runs on the server, in memory, and returns only the answer.
A Redis set is an unordered collection of unique strings. It offers constant-time membership checks and built-in set algebra: intersection, union, and difference. This lesson uses a small social application as its running example, with one set of follower IDs per user, such as followers:alice and followers:bob.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%