1. Keys
Format: Keys {pattern}
Returns all keys that satisfy the given pattern.
2. Exists
Format: Exists ' key '
Determine if key exists.
3. Del
Format: Del ' key '
Delete key.
4. Expire
Format: Expire ' key ' {num}
Set the expiration time on the key, the key must be present, num is seconds.
5. Persist
Format: Persist ' key '
The expiration time of the cancel key must be present.
6. TTL
Format: TTL ' key '
Get the remaining length of the key.
7. Select
Format: select {num}
Select the database, NUM has a value range of 0-15, by default there are 16 databases.
8. Move
Format: Move ' key ' {num}
Move the key to the NUM database.
9. Randomkey
Format: Randomkey
Randomly returns a key in the database.
Ten. Rename
Format: Rename ' key1 ' Key2 '
Rename the Key1 to Key2.
One. Type
Format: type ' key '
Returns the data type of key.
Dbsize.
Format: dbsize
Returns the number of keys in the current database.
Flushdb.
Format: FLUSHDB
Deletes all keys in the current database.
Flushall.
Format: Flushall
Delete all the keys in all databases.
This article is from the "Bronze Gong" blog, please be sure to keep this source http://jaeger.blog.51cto.com/11064196/1772297
Redis key-Value related commands