Understanding Redis Sets and Their Use Cases
Redis Sets are unordered collections of unique strings backed by hash tables that provide O(1) add, delete, and lookup operations, automatically switch to a compact integer array (intset) for small integer-only sets, and are ideal for deduplicated data and fast set operations such as intersection, union, and difference, exemplified by computing common friends in social applications.