CF.COUNT
CF.COUNT key item
- Available in:
- Redis Open Source / Bloom 1.0.0
- Time complexity:
- O(k), where k is the number of sub-filters
- ACL categories:
-
@cuckoo,@read,@slow, - Compatibility:
- Redis Software and Redis Cloud compatibility
Returns an estimation of the number of times a given item was added to a cuckoo filter.
If you just want to check that a given item was added to a cuckoo filter, use CF.EXISTS.
Required arguments
key
is key name for a cuckoo filter.
item
is an item to check.
Examples
Redis Software and Redis Cloud compatibility
| Redis Software |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Supported |
✅ Flexible & Annual ✅ Free & Fixed |
Return information
One of the following:
- Integer reply, where a positive value is an estimation of the number of times
itemwas added to the filter. An overestimation is possible, but not an underestimation.0means thatkeydoes not exist or thatitemhad not been added to the filter. See the note inCF.DEL. - Simple error in these cases: invalid arguments or wrong key type.