Available in: Redis Stack
Time complexity: O(k + i), where k is the number of sub-filters and i is maxIterations
Adds an item to the cuckoo filter, creating the filter if it does not exist.
Cuckoo filters can contain the same item multiple times, and consider each insert
as separate. You can use
CF.ADDNX to only add the item if it does not
exist yet. Keep in mind that deleting an element inserted using
cause false-negative errors.
O(n + i), where n is the number of
sub-filters and i is
Adding items requires up to 2 memory accesses per
But as the filter fills up, both locations for an item might be full. The filter
Cuckoo swap items up to
redis> CF.ADD cf item (integer) 1