Del |
Delete a key or a series of keys; del key1 key2 key3 key4 |
Type |
Returns the Data Type of a key element (none: nonexistent, string: character, list, set, zset, hash) |
Keys |
Returns the matched Key List (Keys Foo *: Search for keys starting with Foo) |
Randomkey |
Obtain an existing key at random |
Rename |
Change the key name. If the name exists, the change fails. |
Dbsize |
Returns the total number of keys of the current database. |
Expire |
Set the expiration time of a key (in seconds), (expire Bruce 1000: the system automatically deletes the key after setting Bruce's key1000 seconds) |
TTL |
How long does it take to query the expiration time of a key? The returned time is second. |
Select |
Select Database |
Move |
Transfers keys from one database to another |
Flushdb |
Clear current database data |
Flushall |
Clear all database data |
Set |
Store a piece of data to the database set keyname datalength data (set Bruce 10 paitoubing: Save a string paitoubing with the key as burce and the string length as 10 to the database) |
Get |
Obtains the value of a key. |
GetSet |
GetSet can be understood as the obtained key value and then set this value for more convenient operations (set Bruce 10 paitoubing. In this case, you need to modify Bruce to 1234567890 and obtain the previous data paitoubing, getSet Bruce 10 1234567890) |
Mget |
Obtain data of multiple keys at a time (mget uid: 1: Name uid: 1: email uid: 1: ciy) |
Setnx |
The difference between setnx and set is that set can create and update the key value. If setnx does not exist, the key and value data will be created. |
Setex |
Setex = set + expire. It seems that I cannot test this version. |
Mset |
Set the value of multiple parameters at a time (mset uid: 1: Name shjuto uid: 1: email shjuto@gmail.com uid: 1: city 8 press ENTER Nanchang) The last value needs to press enter, like set, I don't know why. |
Msetnx |
If the set key does not exist, or is called a new key; set the value of multiple parameters at a time (mset uid: 1: Name shjuto uid: 1: email shjuto@gmail.com uid: 1: city 8 press ENTER Nanchang) The last value needs to press Enter. It is the same as set. |
Incr |
Auto-incrementing. Some classes are MySQL incr. (incr Global: UID) |
Incrby |
Auto-increment + length, (incrby uid 5) original base + 5 = Result |
Decr |
Auto-Subtraction |
Decrby |
Decrby auto-subtraction-lenght |