First, set key, and get
172.16.9.24:6379> set name Tom
172.16.9.24:6379> gets name
Two, delete key, which is used to delete key when key exists
172.16.9.24:6379> del name
three, serialized key
172.16.9.24:6379> dump name
Four, checking for the existence
of a given key 172.16.9.24:6379> exists name
Five, set the expiration time (in seconds) for the given key
172.16.9.24:6379> expire name
Six, in seconds, Returns the remaining lifetimes of the given key
172.16.9.24:6379> TTL name
Seven, move the key of the current database to the given database db (db is from 0-15)
172.16.9.24:6379> move key db
Eight, remove key expiration time, key will persist
172.16.9.24:6379> PERSIST Key
Nine, from the current database to return a key
172.16.9.24:6379> Randomkey
10, modify the name of the key
172.16.9.24:6379> Rename key Newkey
11, only when Newkey does not exist, the key is renamed Newkey.
172.16.9.24:6379> Renamenx Key Newkey
12, returns the type of the value stored by the key.
172.16.9.24:6379> Type key
set expiration Time extension
1, the role of expireat and expire similar to the expireat command to accept the time parameter is the UNIX timestamp (Unix timestamp)
172.16.9.24:6379> expireat key timestamp< C1/>2, set the expiration time of the key in milliseconds
172.16.9.24:6379>pexpire key milliseconds
3, set key expiration time stamp (Unix timestamp) in milliseconds
172.16.9.24:6379> pexpireat Key Milliseconds-timestamp
returns the remaining time extension for a key
Returns the remaining expiration time of a key in milliseconds