Index |
Command |
Description |
1 |
DEL key |
This command is used to delete the key, if it exists. |
2 |
DUMP key |
This command is used to return a serialized version of the value stored at the specified key. |
3 |
EXISTS key |
This command is used to check whether the key exists or not. |
4 |
EXPIRE key |
This command is used to set the expiry of the key after the specified time in seconds. |
5 |
EXPIREAT key |
This command is used to set the expiry of the key after the specified time. Here time is in UNIX timestamp format. |
6 |
PEXPIRE key |
This command is used to set the expiry of key in milliseconds. |
7 |
PEXPIREAT key |
This command is used to set the expiry of the key in UNIX timestamp specified as milliseconds. |
8 |
KEYS pattern |
This command is used to find all keys matching the specified pattern. |
9 |
MOVE key |
It is used to move a key to another database. |
10 |
PERSIST key |
It is used to remove the expiration from the key. |
11 |
PTTL key |
It is used to retrieve the remaining time in keys expiry in milliseconds. |
12 |
TTL key |
It is used to retrieve the remaining time in keys expiry. |
13 |
randomkey |
It is used to get a random key from Redis. |
14 |
RENAME key newkey |
It is used to change the key name. |
15 |
RENAMENX key newkey |
It is used to rename the key, if a new key doesn't exist. |
16 |
TYPE key |
It is used to fetch the data type of the value stored in the key. |