2.16.2.2. General Data Access Commands

SCAN

iterate over existign keys

KEYS

list keys matching glob

RANDOMKEY

get random existing key (but not value)

EXISTS

test existence of a key

COPY

copy existing value to another key

RENAME

move existing value to another key

RENAMENX

... if target does not exist

DEL

delete a key

UNLINK

... with asynchronous memory reclaim

EXPIRE

set relative key expiration time

PEXPIRE

... in milliseconds

EXPIREAT

set absolute key expiration time

PEXPIREAT

... in milliseconds

TTL

get key expiration time

PTTL

... in milliseconds

PERSIST

remove key expiration time

DUMP

serialize value with checksum

RESTORE

... and restore serialized value

TOUCH

set last access time for eviction policies

TYPE

get key type (string, list, hash, zset, set, stream)