? |
? |
del key1 key2 ... keyn span> |
Delete key is Key1,key2...keyn, space delimited. |
persist key |
Removes the lifetime of a given key from" volatile "(with time-to-live key) to" persistent "( A key that does not have a lifetime and never expires). |
expire key seconds |
|
Pexpire key milliseconds |
This command works similarly to the EXPIRE command, but it sets the lifetime of the key in milliseconds, rather than the EXPIRE command, in seconds. |
Exists key |
Is there a key |
keys pattern |
keys * matches all keys in the database. keys H?llo matches Hello, Hallo, Hxllo, and so on. keys H*llo matches Hllo, Heeeeello, and so on. keys H[ae]llo matches hello and Hallo, but does not match Hillo. special symbol with \ separate |
Type key |
Returns the type of key. None,string,list,set,zset,hash |
Randomkey |
Randomly returns a key |
Rename oldkey Newkey |
Renaming |
Dbsize |
Returns the number of keys in the database |
TTL key |
For the key that has the expiration time set, the calculation is how long it will expire, in seconds. |
Pttl Key |
This command is similar to the TTL command, but it returns the remaining lifetime of the key in milliseconds, rather than in seconds, as in the case of the TTL command. |
Select Db-index |
Select the database by index, the default connection database is all 0, the default number of databases is 16. Returns 1 indicates success, 0 failed |
Move Key Db-index |
Move key from the current database to the specified database |
Flushdb |
Delete all keys in the current database, this method does not fail |
Flushall |
Remove all keys from all databases, this method does not fail |
Sort |
Http://redisdoc.com/key/sort.html |