redis keys code example
Example 1: scan and print all keys redis shell
# From shell
redis-cli --raw keys "KeyPrefix*"
# or
redis-cli --scan --pattern "KeyPrefix*"
Example 2: redis get keys
KEYS * # blocks the server
scan NUM # NUM is the page/cursor number (start with 0)