valkey-commands - Man Page

The full list of Valkey commands

Description

Commands per group.

Bitmap

bitcount(3valkey): Counts the number of set bits (population counting) in a string.

bitfield(3valkey): Performs arbitrary bitfield integer operations on strings.

bitfield_ro(3valkey): Performs arbitrary read-only bitfield integer operations on strings.

bitop(3valkey): Performs bitwise operations on multiple strings, and stores the result.

bitpos(3valkey): Finds the first set (1) or clear (0) bit in a string.

getbit(3valkey): Returns a bit value by offset.

setbit(3valkey): Sets or clears the bit at offset of the string value. Creates the key if it doesn’t exist.

Cluster

asking(3valkey): Signals that a cluster client is following an -ASK redirect.

cluster(3valkey): A container for Cluster commands.

cluster-addslots(3valkey): Assigns new hash slots to a node.

cluster-addslotsrange(3valkey): Assigns new hash slot ranges to a node.

cluster-bumpepoch(3valkey): Advances the cluster config epoch.

cluster-count-failure-reports(3valkey): Returns the number of active failure reports active for a node.

cluster-countkeysinslot(3valkey): Returns the number of keys in a hash slot.

cluster-delslots(3valkey): Sets hash slots as unbound for a node.

cluster-delslotsrange(3valkey): Sets hash slot ranges as unbound for a node.

cluster-failover(3valkey): Forces a replica to perform a manual failover of its primary.

cluster-flushslots(3valkey): Deletes all slots information from a node.

cluster-forget(3valkey): Removes a node from the nodes table.

cluster-getkeysinslot(3valkey): Returns the key names in a hash slot.

cluster-help(3valkey): Returns helpful text about the different subcommands.

cluster-info(3valkey): Returns information about the state of a node.

cluster-keyslot(3valkey): Returns the hash slot for a key.

cluster-links(3valkey): Returns a list of all TCP links to and from peer nodes.

cluster-meet(3valkey): Forces a node to handshake with another node.

cluster-myid(3valkey): Returns the ID of a node.

cluster-myshardid(3valkey): Returns the shard ID of a node.

cluster-nodes(3valkey): Returns the cluster configuration for a node.

cluster-replicas(3valkey): Lists the replica nodes of a primary node.

cluster-replicate(3valkey): Configure a node as replica of a primary node.

cluster-reset(3valkey): Resets a node.

cluster-saveconfig(3valkey): Forces a node to save the cluster configuration to disk.

cluster-set-config-epoch(3valkey): Sets the configuration epoch for a new node.

cluster-setslot(3valkey): Binds a hash slot to a node.

cluster-shards(3valkey): Returns the mapping of cluster slots to shards.

cluster-slaves(3valkey): Lists the replica nodes of a primary node. Deprecated.

cluster-slots(3valkey): Returns the mapping of cluster slots to nodes.

readonly(3valkey): Enables read-only queries for a connection to a Valkey replica node.

readwrite(3valkey): Enables read-write queries for a connection to a Valkey replica node.

Connection

auth(3valkey): Authenticates the connection.

client(3valkey): A container for client connection commands.

client-caching(3valkey): Instructs the server whether to track the keys in the next request.

client-capa(3valkey): A client claims its capability.

client-getname(3valkey): Returns the name of the connection.

client-getredir(3valkey): Returns the client ID to which the connection’s tracking notifications are redirected.

client-help(3valkey): Returns helpful text about the different subcommands.

client-id(3valkey): Returns the unique client ID of the connection.

client-info(3valkey): Returns information about the connection.

client-kill(3valkey): Terminates open connections.

client-list(3valkey): Lists open connections.

client-no-evict(3valkey): Sets the client eviction mode of the connection.

client-no-touch(3valkey): Controls whether commands sent by the client affect the LRU/LFU of accessed keys.

client-pause(3valkey): Suspends commands processing.

client-reply(3valkey): Instructs the server whether to reply to commands.

client-setinfo(3valkey): Sets information specific to the client or connection.

client-setname(3valkey): Sets the connection name.

client-tracking(3valkey): Controls server-assisted client-side caching for the connection.

client-trackinginfo(3valkey): Returns information about server-assisted client-side caching for the connection.

client-unblock(3valkey): Unblocks a client blocked by a blocking command from a different connection.

client-unpause(3valkey): Resumes processing commands from paused clients.

echo(3valkey): Returns the given string.

hello(3valkey): Handshakes with the server.

ping(3valkey): Returns the server’s liveliness response.

quit(3valkey): Closes the connection. Deprecated.

reset(3valkey): Resets the connection.

select(3valkey): Changes the selected database.

Generic

copy(3valkey): Copies the value of a key to a new key.

del(3valkey): Deletes one or more keys.

dump(3valkey): Returns a serialized representation of the value stored at a key.

exists(3valkey): Determines whether one or more keys exist.

expire(3valkey): Sets the expiration time of a key in seconds.

expireat(3valkey): Sets the expiration time of a key to a Unix timestamp.

expiretime(3valkey): Returns the expiration time of a key as a Unix timestamp.

keys(3valkey): Returns all key names that match a pattern.

migrate(3valkey): Atomically transfers a key from one instance to another.

move(3valkey): Moves a key to another database.

object(3valkey): A container for object introspection commands.

object-encoding(3valkey): Returns the internal encoding of an object.

object-freq(3valkey): Returns the logarithmic access frequency counter of an object.

object-help(3valkey): Returns helpful text about the different subcommands.

object-idletime(3valkey): Returns the time since the last access to an object.

object-refcount(3valkey): Returns the reference count of a value of a key.

persist(3valkey): Removes the expiration time of a key.

pexpire(3valkey): Sets the expiration time of a key in milliseconds.

pexpireat(3valkey): Sets the expiration time of a key to a Unix milliseconds timestamp.

pexpiretime(3valkey): Returns the expiration time of a key as a Unix milliseconds timestamp.

pttl(3valkey): Returns the expiration time in milliseconds of a key.

randomkey(3valkey): Returns a random key name from the database.

rename(3valkey): Renames a key and overwrites the destination.

renamenx(3valkey): Renames a key only when the target key name doesn’t exist.

restore(3valkey): Creates a key from the serialized representation of a value.

scan(3valkey): Iterates over the key names in the database.

sort(3valkey): Sorts the elements in a list, a set, or a sorted set, optionally storing the result.

sort_ro(3valkey): Returns the sorted elements of a list, a set, or a sorted set.

touch(3valkey): Returns the number of existing keys out of those specified after updating the time they were last accessed.

ttl(3valkey): Returns the expiration time in seconds of a key.

type(3valkey): Determines the type of value stored at a key.

unlink(3valkey): Asynchronously deletes one or more keys.

wait(3valkey): Blocks until the asynchronous replication of all preceding write commands sent by the connection is completed.

waitaof(3valkey): Blocks until all of the preceding write commands sent by the connection are written to the append-only file of the primary and/or replicas.

Geospatial indices

geoadd(3valkey): Adds one or more members to a geospatial index. The key is created if it doesn’t exist.

geodist(3valkey): Returns the distance between two members of a geospatial index.

geohash(3valkey): Returns members from a geospatial index as geohash strings.

geopos(3valkey): Returns the longitude and latitude of members from a geospatial index.

georadius(3valkey): Queries a geospatial index for members within a distance from a coordinate, optionally stores the result. Deprecated.

georadiusbymember(3valkey): Queries a geospatial index for members within a distance from a member, optionally stores the result. Deprecated.

georadiusbymember_ro(3valkey): Returns members from a geospatial index that are within a distance from a member. Deprecated.

georadius_ro(3valkey): Returns members from a geospatial index that are within a distance from a coordinate. Deprecated.

geosearch(3valkey): Queries a geospatial index for members inside an area of a box or a circle.

geosearchstore(3valkey): Queries a geospatial index for members inside an area of a box or a circle, optionally stores the result.

Hash

hdel(3valkey): Deletes one or more fields and their values from a hash. Deletes the hash if no fields remain.

hexists(3valkey): Determines whether a field exists in a hash.

hget(3valkey): Returns the value of a field in a hash.

hgetall(3valkey): Returns all fields and values in a hash.

hincrby(3valkey): Increments the integer value of a field in a hash by a number. Uses 0 as initial value if the field doesn’t exist.

hincrbyfloat(3valkey): Increments the floating point value of a field by a number. Uses 0 as initial value if the field doesn’t exist.

hkeys(3valkey): Returns all fields in a hash.

hlen(3valkey): Returns the number of fields in a hash.

hmget(3valkey): Returns the values of all fields in a hash.

hmset(3valkey): Sets the values of multiple fields. Deprecated.

hrandfield(3valkey): Returns one or more random fields from a hash.

hscan(3valkey): Iterates over fields and values of a hash.

hset(3valkey): Creates or modifies the value of a field in a hash.

hsetnx(3valkey): Sets the value of a field in a hash only when the field doesn’t exist.

hstrlen(3valkey): Returns the length of the value of a field.

hvals(3valkey): Returns all values in a hash.

HyperLogLog

pfadd(3valkey): Adds elements to a HyperLogLog key. Creates the key if it doesn’t exist.

pfcount(3valkey): Returns the approximated cardinality of the set(s) observed by the HyperLogLog key(s).

pfdebug(3valkey): Internal commands for debugging HyperLogLog values.

pfmerge(3valkey): Merges one or more HyperLogLog values into a single key.

pfselftest(3valkey): An internal command for testing HyperLogLog values.

List

blmove(3valkey): Pops an element from a list, pushes it to another list and returns it. Blocks until an element is available otherwise. Deletes the list if the last element was moved.

blmpop(3valkey): Pops the first element from one of multiple lists. Blocks until an element is available otherwise. Deletes the list if the last element was popped.

blpop(3valkey): Removes and returns the first element in a list. Blocks until an element is available otherwise. Deletes the list if the last element was popped.

brpop(3valkey): Removes and returns the last element in a list. Blocks until an element is available otherwise. Deletes the list if the last element was popped.

brpoplpush(3valkey): Pops an element from a list, pushes it to another list and returns it. Block until an element is available otherwise. Deletes the list if the last element was popped. Deprecated.

lindex(3valkey): Returns an element from a list by its index.

linsert(3valkey): Inserts an element before or after another element in a list.

llen(3valkey): Returns the length of a list.

lmove(3valkey): Returns an element after popping it from one list and pushing it to another. Deletes the list if the last element was moved.

lmpop(3valkey): Returns multiple elements from a list after removing them. Deletes the list if the last element was popped.

lpop(3valkey): Returns the first elements in a list after removing it. Deletes the list if the last element was popped.

lpos(3valkey): Returns the index of matching elements in a list.

lpush(3valkey): Prepends one or more elements to a list. Creates the key if it doesn’t exist.

lpushx(3valkey): Prepends one or more elements to a list only when the list exists.

lrange(3valkey): Returns a range of elements from a list.

lrem(3valkey): Removes elements from a list. Deletes the list if the last element was removed.

lset(3valkey): Sets the value of an element in a list by its index.

ltrim(3valkey): Removes elements from both ends a list. Deletes the list if all elements were trimmed.

rpop(3valkey): Returns and removes the last elements of a list. Deletes the list if the last element was popped.

rpoplpush(3valkey): Returns the last element of a list after removing and pushing it to another list. Deletes the list if the last element was popped. Deprecated.

rpush(3valkey): Appends one or more elements to a list. Creates the key if it doesn’t exist.

rpushx(3valkey): Appends an element to a list only when the list exists.

Pub/Sub

psubscribe(3valkey): Listens for messages published to channels that match one or more patterns.

publish(3valkey): Posts a message to a channel.

pubsub(3valkey): A container for Pub/Sub commands.

pubsub-channels(3valkey): Returns the active channels.

pubsub-help(3valkey): Returns helpful text about the different subcommands.

pubsub-numpat(3valkey): Returns a count of unique pattern subscriptions.

pubsub-numsub(3valkey): Returns a count of subscribers to channels.

pubsub-shardchannels(3valkey): Returns the active shard channels.

pubsub-shardnumsub(3valkey): Returns the count of subscribers of shard channels.

punsubscribe(3valkey): Stops listening to messages published to channels that match one or more patterns.

spublish(3valkey): Post a message to a shard channel

ssubscribe(3valkey): Listens for messages published to shard channels.

subscribe(3valkey): Listens for messages published to channels.

sunsubscribe(3valkey): Stops listening to messages posted to shard channels.

unsubscribe(3valkey): Stops listening to messages posted to channels.

Scripting and Functions

eval(3valkey): Executes a server-side Lua script.

evalsha(3valkey): Executes a server-side Lua script by SHA1 digest.

evalsha_ro(3valkey): Executes a read-only server-side Lua script by SHA1 digest.

eval_ro(3valkey): Executes a read-only server-side Lua script.

fcall(3valkey): Invokes a function.

fcall_ro(3valkey): Invokes a read-only function.

function(3valkey): A container for function commands.

function-delete(3valkey): Deletes a library and its functions.

function-dump(3valkey): Dumps all libraries into a serialized binary payload.

function-flush(3valkey): Deletes all libraries and functions.

function-help(3valkey): Returns helpful text about the different subcommands.

function-kill(3valkey): Terminates a function during execution.

function-list(3valkey): Returns information about all libraries.

function-load(3valkey): Creates a library.

function-restore(3valkey): Restores all libraries from a payload.

function-stats(3valkey): Returns information about a function during execution.

script(3valkey): A container for Lua scripts management commands.

script-debug(3valkey): Sets the debug mode of server-side Lua scripts.

script-exists(3valkey): Determines whether server-side Lua scripts exist in the script cache.

script-flush(3valkey): Removes all server-side Lua scripts from the script cache.

script-help(3valkey): Returns helpful text about the different subcommands.

script-kill(3valkey): Terminates a server-side Lua script during execution.

script-load(3valkey): Loads a server-side Lua script to the script cache.

script-show(3valkey): Show server-side Lua script in the script cache.

Server

acl(3valkey): A container for Access List Control commands.

acl-cat(3valkey): Lists the ACL categories, or the commands inside a category.

acl-deluser(3valkey): Deletes ACL users, and terminates their connections.

acl-dryrun(3valkey): Simulates the execution of a command by a user, without executing the command.

acl-genpass(3valkey): Generates a pseudorandom, secure password that can be used to identify ACL users.

acl-getuser(3valkey): Lists the ACL rules of a user.

acl-help(3valkey): Returns helpful text about the different subcommands.

acl-list(3valkey): Dumps the effective rules in ACL file format.

acl-load(3valkey): Reloads the rules from the configured ACL file.

acl-log(3valkey): Lists recent security events generated due to ACL rules.

acl-save(3valkey): Saves the effective ACL rules in the configured ACL file.

acl-setuser(3valkey): Creates and modifies an ACL user and its rules.

acl-users(3valkey): Lists all ACL users.

acl-whoami(3valkey): Returns the authenticated username of the current connection.

bgrewriteaof(3valkey): Asynchronously rewrites the append-only file to disk.

bgsave(3valkey): Asynchronously saves the database(s) to disk.

command(3valkey): Returns detailed information about all commands.

command-count(3valkey): Returns a count of commands.

command-docs(3valkey): Returns documentary information about one, multiple or all commands.

command-getkeys(3valkey): Extracts the key names from an arbitrary command.

command-getkeysandflags(3valkey): Extracts the key names and access flags for an arbitrary command.

command-help(3valkey): Returns helpful text about the different subcommands.

command-info(3valkey): Returns information about one, multiple or all commands.

command-list(3valkey): Returns a list of command names.

config(3valkey): A container for server configuration commands.

config-get(3valkey): Returns the effective values of configuration parameters.

config-help(3valkey): Returns helpful text about the different subcommands.

config-resetstat(3valkey): Resets the server’s statistics.

config-rewrite(3valkey): Persists the effective configuration to file.

config-set(3valkey): Sets configuration parameters in-flight.

dbsize(3valkey): Returns the number of keys in the database.

debug(3valkey): A container for debugging commands.

failover(3valkey): Starts a coordinated failover from a server to one of its replicas.

flushall(3valkey): Removes all keys from all databases.

flushdb(3valkey): Remove all keys from the current database.

info(3valkey): Returns information and statistics about the server.

lastsave(3valkey): Returns the Unix timestamp of the last successful save to disk.

latency(3valkey): A container for latency diagnostics commands.

latency-doctor(3valkey): Returns a human-readable latency analysis report.

latency-graph(3valkey): Returns a latency graph for an event.

latency-help(3valkey): Returns helpful text about the different subcommands.

latency-histogram(3valkey): Returns the cumulative distribution of latencies of a subset or all commands.

latency-history(3valkey): Returns timestamp-latency samples for an event.

latency-latest(3valkey): Returns the latest latency samples for all events.

latency-reset(3valkey): Resets the latency data for one or more events.

lolwut(3valkey): Displays computer art and the server version

memory(3valkey): A container for memory diagnostics commands.

memory-doctor(3valkey): Outputs a memory problems report.

memory-help(3valkey): Returns helpful text about the different subcommands.

memory-malloc-stats(3valkey): Returns the allocator statistics.

memory-purge(3valkey): Asks the allocator to release memory.

memory-stats(3valkey): Returns details about memory usage.

memory-usage(3valkey): Estimates the memory usage of a key.

module(3valkey): A container for module commands.

module-help(3valkey): Returns helpful text about the different subcommands.

module-list(3valkey): Returns all loaded modules.

module-load(3valkey): Loads a module.

module-loadex(3valkey): Loads a module using extended parameters.

module-unload(3valkey): Unloads a module.

monitor(3valkey): Listens for all requests received by the server in real-time.

psync(3valkey): An internal command used in replication.

replconf(3valkey): An internal command for configuring the replication stream.

replicaof(3valkey): Configures a server as replica of another, or promotes it to a primary.

restore-asking(3valkey): An internal command for migrating keys in a cluster.

role(3valkey): Returns the replication role.

save(3valkey): Synchronously saves the database(s) to disk.

shutdown(3valkey): Synchronously saves the database(s) to disk and shuts down the server.

slaveof(3valkey): Sets a server as a replica of another, or promotes it to being a primary. Deprecated.

slowlog(3valkey): A container for slow log commands.

slowlog-get(3valkey): Returns the slow log’s entries.

slowlog-help(3valkey): Show helpful text about the different subcommands

slowlog-len(3valkey): Returns the number of entries in the slow log.

slowlog-reset(3valkey): Clears all entries from the slow log.

swapdb(3valkey): Swaps two databases.

sync(3valkey): An internal command used in replication.

time(3valkey): Returns the server time.

Set

sadd(3valkey): Adds one or more members to a set. Creates the key if it doesn’t exist.

scard(3valkey): Returns the number of members in a set.

sdiff(3valkey): Returns the difference of multiple sets.

sdiffstore(3valkey): Stores the difference of multiple sets in a key.

sinter(3valkey): Returns the intersect of multiple sets.

sintercard(3valkey): Returns the number of members of the intersect of multiple sets.

sinterstore(3valkey): Stores the intersect of multiple sets in a key.

sismember(3valkey): Determines whether a member belongs to a set.

smembers(3valkey): Returns all members of a set.

smismember(3valkey): Determines whether multiple members belong to a set.

smove(3valkey): Moves a member from one set to another.

spop(3valkey): Returns one or more random members from a set after removing them. Deletes the set if the last member was popped.

srandmember(3valkey): Get one or multiple random members from a set

srem(3valkey): Removes one or more members from a set. Deletes the set if the last member was removed.

sscan(3valkey): Iterates over members of a set.

sunion(3valkey): Returns the union of multiple sets.

sunionstore(3valkey): Stores the union of multiple sets in a key.

Sorted Set

bzmpop(3valkey): Removes and returns a member by score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped.

bzpopmax(3valkey): Removes and returns the member with the highest score from one or more sorted sets. Blocks until a member available otherwise. Deletes the sorted set if the last element was popped.

bzpopmin(3valkey): Removes and returns the member with the lowest score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped.

zadd(3valkey): Adds one or more members to a sorted set, or updates their scores. Creates the key if it doesn’t exist.

zcard(3valkey): Returns the number of members in a sorted set.

zcount(3valkey): Returns the count of members in a sorted set that have scores within a range.

zdiff(3valkey): Returns the difference between multiple sorted sets.

zdiffstore(3valkey): Stores the difference of multiple sorted sets in a key.

zincrby(3valkey): Increments the score of a member in a sorted set.

zinter(3valkey): Returns the intersect of multiple sorted sets.

zintercard(3valkey): Returns the number of members of the intersect of multiple sorted sets.

zinterstore(3valkey): Stores the intersect of multiple sorted sets in a key.

zlexcount(3valkey): Returns the number of members in a sorted set within a lexicographical range.

zmpop(3valkey): Returns the highest- or lowest-scoring members from one or more sorted sets after removing them. Deletes the sorted set if the last member was popped.

zmscore(3valkey): Returns the score of one or more members in a sorted set.

zpopmax(3valkey): Returns the highest-scoring members from a sorted set after removing them. Deletes the sorted set if the last member was popped.

zpopmin(3valkey): Returns the lowest-scoring members from a sorted set after removing them. Deletes the sorted set if the last member was popped.

zrandmember(3valkey): Returns one or more random members from a sorted set.

zrange(3valkey): Returns members in a sorted set within a range of indexes.

zrangebylex(3valkey): Returns members in a sorted set within a lexicographical range. Deprecated.

zrangebyscore(3valkey): Returns members in a sorted set within a range of scores. Deprecated.

zrangestore(3valkey): Stores a range of members from sorted set in a key.

zrank(3valkey): Returns the index of a member in a sorted set ordered by ascending scores.

zrem(3valkey): Removes one or more members from a sorted set. Deletes the sorted set if all members were removed.

zremrangebylex(3valkey): Removes members in a sorted set within a lexicographical range. Deletes the sorted set if all members were removed.

zremrangebyrank(3valkey): Removes members in a sorted set within a range of indexes. Deletes the sorted set if all members were removed.

zremrangebyscore(3valkey): Removes members in a sorted set within a range of scores. Deletes the sorted set if all members were removed.

zrevrange(3valkey): Returns members in a sorted set within a range of indexes in reverse order. Deprecated.

zrevrangebylex(3valkey): Returns members in a sorted set within a lexicographical range in reverse order. Deprecated.

zrevrangebyscore(3valkey): Returns members in a sorted set within a range of scores in reverse order. Deprecated.

zrevrank(3valkey): Returns the index of a member in a sorted set ordered by descending scores.

zscan(3valkey): Iterates over members and scores of a sorted set.

zscore(3valkey): Returns the score of a member in a sorted set.

zunion(3valkey): Returns the union of multiple sorted sets.

zunionstore(3valkey): Stores the union of multiple sorted sets in a key.

Stream

xack(3valkey): Returns the number of messages that were successfully acknowledged by the consumer group member of a stream.

xadd(3valkey): Appends a new message to a stream. Creates the key if it doesn’t exist.

xautoclaim(3valkey): Changes, or acquires, ownership of messages in a consumer group, as if the messages were delivered to as consumer group member.

xclaim(3valkey): Changes, or acquires, ownership of a message in a consumer group, as if the message was delivered a consumer group member.

xdel(3valkey): Returns the number of messages after removing them from a stream.

xgroup(3valkey): A container for consumer groups commands.

xgroup-create(3valkey): Creates a consumer group.

xgroup-createconsumer(3valkey): Creates a consumer in a consumer group.

xgroup-delconsumer(3valkey): Deletes a consumer from a consumer group.

xgroup-destroy(3valkey): Destroys a consumer group.

xgroup-help(3valkey): Returns helpful text about the different subcommands.

xgroup-setid(3valkey): Sets the last-delivered ID of a consumer group.

xinfo(3valkey): A container for stream introspection commands.

xinfo-consumers(3valkey): Returns a list of the consumers in a consumer group.

xinfo-groups(3valkey): Returns a list of the consumer groups of a stream.

xinfo-help(3valkey): Returns helpful text about the different subcommands.

xinfo-stream(3valkey): Returns information about a stream.

xlen(3valkey): Return the number of messages in a stream.

xpending(3valkey): Returns the information and entries from a stream consumer group’s pending entries list.

xrange(3valkey): Returns the messages from a stream within a range of IDs.

xread(3valkey): Returns messages from multiple streams with IDs greater than the ones requested. Blocks until a message is available otherwise.

xreadgroup(3valkey): Returns new or historical messages from a stream for a consumer in a group. Blocks until a message is available otherwise.

xrevrange(3valkey): Returns the messages from a stream within a range of IDs in reverse order.

xsetid(3valkey): An internal command for replicating stream values.

xtrim(3valkey): Deletes messages from the beginning of a stream.

String

append(3valkey): Appends a string to the value of a key. Creates the key if it doesn’t exist.

decr(3valkey): Decrements the integer value of a key by one. Uses 0 as initial value if the key doesn’t exist.

decrby(3valkey): Decrements a number from the integer value of a key. Uses 0 as initial value if the key doesn’t exist.

get(3valkey): Returns the string value of a key.

getdel(3valkey): Returns the string value of a key after deleting the key.

getex(3valkey): Returns the string value of a key after setting its expiration time.

getrange(3valkey): Returns a substring of the string stored at a key.

getset(3valkey): Returns the previous string value of a key after setting it to a new value. Deprecated.

incr(3valkey): Increments the integer value of a key by one. Uses 0 as initial value if the key doesn’t exist.

incrby(3valkey): Increments the integer value of a key by a number. Uses 0 as initial value if the key doesn’t exist.

incrbyfloat(3valkey): Increment the floating point value of a key by a number. Uses 0 as initial value if the key doesn’t exist.

lcs(3valkey): Finds the longest common substring.

mget(3valkey): Atomically returns the string values of one or more keys.

mset(3valkey): Atomically creates or modifies the string values of one or more keys.

msetnx(3valkey): Atomically modifies the string values of one or more keys only when all keys don’t exist.

psetex(3valkey): Sets both string value and expiration time in milliseconds of a key. The key is created if it doesn’t exist. Deprecated.

set(3valkey): Sets the string value of a key, ignoring its type. The key is created if it doesn’t exist.

setex(3valkey): Sets the string value and expiration time of a key. Creates the key if it doesn’t exist. Deprecated.

setnx(3valkey): Set the string value of a key only when the key doesn’t exist. Deprecated.

setrange(3valkey): Overwrites a part of a string value with another by an offset. Creates the key if it doesn’t exist.

strlen(3valkey): Returns the length of a string value.

substr(3valkey): Returns a substring from a string value. Deprecated.

Transactions

discard(3valkey): Discards a transaction.

exec(3valkey): Executes all commands in a transaction.

multi(3valkey): Starts a transaction.

unwatch(3valkey): Forgets about watched keys of a transaction.

watch(3valkey): Monitors changes to keys to determine the execution of a transaction.

See Also

valkey(7), valkey-data-types(7)

Referenced By

valkey(7), valkey-bitmaps(7), valkey-cli(1), valkey-data-types(7), valkey-eval-intro(7), valkey-geospatial(7), valkey-hashes(7), valkey-hyperloglogs(7), valkey-lists(7), valkey-programmability(7), valkey-quickstart(7), valkey-sets(7), valkey-sorted-sets(7), valkey-streams-intro(7), valkey-strings(7).

2024-09-23 8.0.0 Valkey Command Manual