Enlist some operation keys of Redis?

devquora
devquora

Posted On: Jan 09, 2021

 

Some operation keys of Redis are listed bellow:

CommandDescription
APPEND key valueAppend a value to a key
AUTH passwordAuthenticate to the server
BGREWRITEAOFAsynchronously rewrite the append-only file
BITPOS key bit [start] [end]Find the first-bit set or clear in a string
BLPOP key [key ...] timeoutRemove and get the first element in a list, or block until one is available
CLIENT LISTGet the list of client connections
CLIENT PAUSE timeoutStop processing commands from clients for some time
CLUSTER FORGET node-idRemove a node from the nodes table
CLUSTER INFOProvides info about Redis Cluster node state
CLUSTER KEYSLOT keyReturns the hash slot of the specified key
CLUSTER MEET ip portForce a node cluster to handshake with another node
CLUSTER NODESGet Cluster config for the node
CLUSTER SAVECONFIGForces the node to save cluster state on disk
CLUSTER SLAVES node-idList slave nodes of the specified master node
CLUSTER SLOTSGet an array of Cluster slot to node mappings
COMMANDGet an array of Redis command details
COMMAND COUNTGet the total number of Redis commands
COMMAND GETKEYSExtract keys are given a full Redis command
CONFIG GET parameterGet the value of a configuration parameter
CONFIG REWRITERewrite the configuration file with the in-memory configuration
CONFIG SET parameter valueSet a configuration parameter to the given value
CONFIG RESETSTATReset the stats returned by INFO
DBSIZEReturn the number of keys in the selected database
DEBUG OBJECT keyGet debugging information about a key
DEBUG SEGFAULTMake the server crash
DECR keyDecrement the integer value of a key by one
DECRBY key decrementDecrement the integer value of a key by the given number
DEL key [key ...]Delete a key
DISCARDDiscard all commands issued after MULTI
DUMP keyReturn a serialized version of the value stored at the specified key.
ECHO messageEcho the given string
EXECExecute all commands issued after MULTI
EXPIRE key secondsSet a key's time to live in seconds
GET keyGet the value of a key
GETBIT key offsetReturns the bit value at offset in the string value stored at key
GETRANGE key start endGet a substring of the string stored at a key
GETSET key valueSet the string value of a key and return its old value
HDEL key field [field ...]Delete one or more hash fields
HEXISTS key fieldDetermine if a hash field exists
HGET key fieldGet the value of a hash field
HGETALL keyGet all the fields and values in a hash
HKEYS keyGet all the fields in a hash
HLEN keyGet the number of fields in a hash
HSET key field valueSet the string value of a hash field
HSETNX key field valueSet the value of a hash field, only if the field does not exist
HSTRLEN key fieldGet the length of the value of a hash field
HVALS keyGet all the values in a hash
INCR keyIncrement the integer value of a key by one
INCRBY key incrementIncrement the integer value of a key by the given amount
INFO [section]Get information and statistics about the server
KEYS patternFind all keys matching the given pattern
LASTSAVEGet the UNIX timestamp of the last successful save to a disk
LINDEX key indexGet an element from a list by its index
LLEN keyGet the length of a list
LPOP keyRemove and get the first element in a list
LPUSHX key valuePrepend a value to a list, only if the list exists
LRANGE key start stopGet a range of elements from a list
LREM key count valueRemove elements from a list
LSET key index valueSet the value of an element in a list by its index
LTRIM key start stopTrim a list to the specified range
MGET key [key ...]Get the values of all the given keys
MONITORListen for all requests received by the server in real-time
MOVE key dbMove a key to another database
MULTIMark the start of a transaction block
PERSIST keyRemove the expiration from a key
PFCOUNT key [key ...]Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).
PING [message]Ping the server
PTTL keyGet the time to live for a key in milliseconds
QUITClose the connection
RANDOMKEYReturn a random key from the keyspace
READONLYEnables read queries for a connection to a cluster slave node
READWRITEDisables read queries for a connection to a cluster slave node
RENAME key newkeyRename a key
ROLEReturn the role of the instance in the context of replication
RPOP keyRemove and get the last element in a list
RPUSHX key valueAppend a value to a list, only if the list exists
SAVESynchronously save the dataset to disk
SCARD keyGet the number of members in a set
SCRIPT FLUSHRemove all the scripts from the script cache.
SCRIPT KILLKill the script currently in execution.
SCRIPT LOAD scriptLoad the specified Lua script into the script cache.
SDIFF key [key ...]Subtract multiple sets
SELECT indexChange the selected database for the current connection
SETNX key valueSet the value of a key, only if the key does not exist
SINTER key [key ...]Intersect multiple sets
SLAVEOF host portMake the server a slave of another instance, or promote it as master
SMEMBERS keyGet all the members in a set
SPOP key [count]Remove and return one or multiple random members from a set
STRLEN keyGet the length of the value stored in a key
SWAPDB index indexSwaps two Redis databases
SYNCAn internal command used for replication
TIMEReturn the current server time
TOUCH key [key ...]Alters the last access time of a key(s). Returns the number of existing keys specified.
TTL keyGet the time to live for a key
TYPE keyDetermine the type stored at key
UNLINK key [key ...]Delete a key asynchronously in another thread. Otherwise, it is just as DEL, but non-blocking.
UNWATCHForget about all watched keys

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Redis interview questions

    What is Redis?

    Redis is an open source released under BSD licensed, in-memory data structure store, it can be used as a database, cach..

    Redis interview questions

    List the data structures supported by Redis.

    Redis supports following Data Structures Strings Hashes Lists Sets Sorted sets with range queries bitmaps Hyperloglogs ..

    Redis interview questions

    List some advantages of Redis?

    Following are some advantages of Redis Exceptionally Faster than othersSupports for rich data types like Hashes, Set..