sudo service redis start
sudo service redis stop
sudo service Redis restart
Redis-cli
First, the database
Redis default of 16 databases (0-15)
Switch database
Redis supports the following data types by default
1 . String Type
Add, modify
Add multiple key values
Append value
Get value
Get Multiple values
2. Key operation
View all Keys
View the key that contains a in the name
Determines whether the key exists, returns 1 if present, does not exist return 0
Delete keys and their corresponding values
3 , hash type
Add, modify
Setting multiple properties
Gets all properties of the specified key
Gets the value of a property
Get the values of multiple properties
Get the value of all properties
Delete the key value of the entire hash
4. List Type
Increase
Get Data
Modify
Delete
5. Set Type
Increase
Get element
Delete Element
6. Zset type (ordered set)
Increase
Get element
Gets the member between the weight values
Weight of the return value
Delete
Redis Database Common Operations