Info Server basic Information
Monitor live dump of received requests
FLUSHDB emptying the current database
Flushall emptying all databases
Quit close Connection
Save keeps data synchronized to disk
Bgsave Asynchronous
Lastsave returns the last timestamp that successfully saved data to disk
Shundown keeping data synchronized to disk and shutting down services
Set key value to add data
Get key to get data
exists key data is present
Keys <key match > Blur lookup data//*/? */?*? such as
Expire key time (in seconds) set data expiration
Persist key cancels data expiration time
TTL key gets the data remaining expiration time (which can also exist)
Number of keys in the Dbsize database
Del key deletes the data for the specified key
Type key returns key corresponding to value
Randomkey randomly returns a key that already exists
Data is of type string
Set key value to add data
Get key to get data
Getset key value Gets the value of key and assigns a new value
Mset key1 value1 ... keyN valuen Bulk Add data
Mget key1 Key2......keyn Get multiple data
Msetnx key1 value1 ... keyN valuen the value of all keys is not present, add all, and do nothing if a key already exists
Setex Key Time value adds a data with an expiration date
INCR key key exists then +1 operation, does not exist add data value to "1"
Incrby key num Key exists then +num operation, does not exist add data value to "num"
DECR key-1-1
Decrby Key Num-num-num
The value of the above four instruction key must be a string type number according to the observation record is to repeat the operation in 1 units, such as +1 will operate two times, but DECR will show negative number of operations
Append key value stitching value on key
SUBSTR Key Start end returns the value of key from start to the end of the substring, but does not modify the value of key start and end represent the subscript index of the string 0.
The above two instructions and the concatenation of string in Java, the same as according to observation record append also need to operate two times
Redis Common Commands