You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Redis DB
Hi everybody. Can someone explain me why isthishappen?
Greg Andrews
unread,
Aug 25, 2023, 12:40:52 PM8/25/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Redis DB
The answer that was posted to that stackoverflow question says:
A single SCAN command is not guaranteed to give you any keys, even if you pass `count=5` to it.
Since an individual SCAN command can return empty results, you must invoke SCAN repeatedly, saving the key list that's returned by each invocation, looping until it returns the "next cursor" value of 0. This is also outlined in the Redio.IO documentation for SCAN.
Your example code in the question isn't calling SCAN in a loop and checking the cursor value returned by the command. It's only calling SCAN once, which is not guaranteed to give you the list of existing keys.