I have a Redis set called userids with over 100,000 entries in it.
When I run
redis-cli smembers userids | grep 12288357681
it returns a value like: 1324. 12288357681
This means that redis found the userid in the set.
But when I run:
redis-cli sismember userids 12288357681
it returns this: (integer) 0
This means that redis DID NOT find the userid in the set.
How is this possible? Am I using the sismember function incorrectly?
Perhaps the value stored in your set is
1324. 12288357681instead of just12288357681?Check the below tests:
Note the output of
grep, it is different from yours.