Service command:
bgrewriteaof Asynchronous Rewrite append file
bgsave saving datasets to disk asynchronously
client KILL Ip:port Close the client connection
Client list getting client connection lists
Client Pause Timeout pauses processing of client commands
client GETNAME Get the current connection name
client SETNAME Connection-name Set the name of the current connection
Config get parameter get the value of the configuration parameter
config REWRITE from write in-memory configuration file
Config SET parameter value gets the values of the configuration parameters
config Resetstat reset redistribution using the info command to report statistics
Dbsize Returns the number of keys in the current database
Debug OBJECT Key Gets the DEBUG information for a key
Debug Segfault crashes the server
Flushall emptying all databases
Flushdb emptying the current database
info [section] Get details about the server
Lastsave time to get the last sync disk
Monitor real-time monitoring server
save synchronizing data to disk
shutdown [Nosave] [SAVE] Close Service
slaveof Host port Specifies the primary server for the current server
slowlog subcommand [argument] managing the redistribution of slow query logs
Sync internal commands for replication
time returns the current server time
Connection command:
Auth Password Authentication server
echo message echo input string
Ping PING Server
quit close connection, exit
Select Index Select Database
Key-value command:
• del key [key ...] Delete a key
dump key to export the value of key
exists key to find out if a key exists
expire key seconds sets the number of expired seconds for a key
expireat key Timestamp set expiration time for a UNIX timestamp
keys pattern finds all keys that match a given pattern
Migrate host port key destination-db timeout atomicity move key from one instance of Redis to another instance
move key DB move one key to another database
object subcommand [arguments [arguments ...] Check for the internal redistribution object
persist key to remove key expiration time
Pexpire key milliseconds sets the number of milliseconds to expire for a key
pexpireat key Milliseconds-timestamp sets the expiration time for a UNIX timestamp with milliseconds
Pttl key Gets the effective number of milliseconds for key
Randomkey returns a random key
Rename key Newkey renaming a key
Renamenx key Newkey rename a key, the new key must be a nonexistent key
restore key TTL serialized-valuecreate a key using the provided serialized value, previously obtained using
DUMP.
Scan cursor [MATCH pattern] [count count] increment iteration key
sort key [by pattern] [LIMIT offset count] [get pattern [get pattern ...]] [asc| DESC] [ALPHA]
[STORE destination] sorting queues, collections, ordered collections
TTL key Gets the effective time (in seconds) of key
type key gets the storage type of key
Script command:
eval script Numkeys key [key ...] arg [arg ...] Executing LUA scripts on the server side
Evalsha SHA1 numkeys key [key ...] arg [arg ...] Executing LUA scripts on the server side
Script EXISTS script [script ...] Check existence of scripts in the script cache.
script FLUSH deletes all Lua scripts in the server cache.
script kill kills the currently running Lua script.
script Load Script loads a Lua script from the server cache.
Transaction command:
Discard Discard all MULTI after the command is sent
exec Execute all MULTI after the command is issued
Multi mark a transaction block start
Unwatch Canceling a transaction
watch key [key ...] Lock key until the multi/exec command is executed
To publish a subscription command:
psubscribe pattern [pattern ...] Listen to publish messages that match channels of a given pattern
Publish channel message publishes a message to the channel
pubsub subcommand [argument [argument ...] Check the status of the Pub/sub subsystem
Punsubscribe [pattern [pattern ...]] Stop publishing a message to a channel that matches a given pattern
Subscribe Channel [channel ...] Hear a message about the way to publish
unsubscribe [Channel [channel ...]] Message to stop publishing a route