1. SET: This command is used to set a key value pair in the Redis database.

Example: SET mykey “Hello world”

2. GET: This command is used to get the value of a key from the Redis database.

Example: GET mykey

3. DEL: This command is used to delete a key from the Redis database.

Example: DEL mykey

4. EXISTS: This command is used to check if a key exists in the Redis database.

Example: EXISTS mykey

5. EXPIRE: This command is used to set a timeout for a key in the Redis database.

Example: EXPIRE mykey 60

6. KEYS: This command is used to get all the keys in the Redis database.

Example: KEYS *

Leave a Reply

Your email address will not be published. Required fields are marked *