Redis is a key-value database (also known as a key-value store) that uses a simple key/value method to store data. Strings are the simplest data type in Redis and are simple key/value entries. To save or fetch string data there are Redis SET and GET commands. Redis SET command creates a key and assigns it […]
In Redis you can flush cache/database and delete all keys from all databases or from the particular database only using FLUSHALL and FLUSHDB commands. To delete all keys from all Redis databases, use the FLUSHALL command. To delete all keys of the selected Redis database only, use the FLUSHDB commnad.
There are two ways to get all keys from the all databases in Redis. The first way is to list keys using –scan option and the second one is to get all keys using the KEYS command. Note that the first way of getting all keys is preferable as it doesn’t require the client to […]