Retrieving/Listing all key/value pairs in a Redis db

You can explore the Redis dataset using the redis-cli tool included in the Redis distribution.

Just start the tool without arguments, then type commands to explore the dataset.

For instance KEYS will list all the keys matching a glob-style pattern, for instance with: keys * you’ll see all the keys available.

Then you can use the TYPE command to check what type is a given key, if it’s a list you can retrieve the elements inside using LRANGE mykey 0 -1. If it is a Set you’ll use instead SMEMBERS mykey and so forth. Check the Redis documentation for a list of all the available commands and how they work.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)