tencent cloud

Last updated:2025-12-25 17:47:40
Keys
Last updated: 2025-12-25 17:47:40
Redis 4.0, 5.0, 6.2, 7.0, and ValKey 8.0 Standard Architecture and Cluster Architecture all support the touch, restore, object, unlink, wait, dump, del, scan, exists, expire, expireat, keys, type, move, ttl, persist, pexpire, pexpireat, pttl, randomkey, rename, renamenx, and sort commands.
Only Redis 6.2, 7.0, and its ValKey 8.0 support the copy command and object help command.
Cluster Architecture supports the del and exists commands in cross-slot scenarios, but does not support unlink, rename, or renamenx.
Redis 7.0 version and its ValKey 8.0 support: sort_ro, expiretime, pexpiretime.
Command Family
Command
New Description
Keys Family
EXPIRETIME key
New commands added.
Returns the second-precision expiration timestamp of the key.
PEXPIRETIME key
New commands added.
Returns the millisecond-precision expiration timestamp of the key.
EXPIRE key seconds [NX | XX | GT | LT]

New parameters added: NX | XX | GT | LT.
NX sets an expiration time only when the key does not have an expiration time.
XX sets an expiration time only when the key has an expiration time.
GT sets a new expiration time only when the new expiration time is greater than the current expiration time.
LT sets a new expiration time only when the new expiration time is less than the current expiration time.
SORT_RO key [BY pattern] [LIMIT offset count] [GET pattern [GET pattern ...]] [ASC | DESC] [ALPHA]
New commands added.
Sort the sorted set (sorted set) in Redis and obtain the sorted results.
For specific information, see the table below. "✓" indicates support, "x" indicates no support, and "-" indicates that the command does not involve scenarios of cross-slot access.
Command
Redis 7.0/ValKey 8.0 Standard Architecture
Redis 7.0/ValKey 8.0 Cluster Architecture
Redis 6.2 Standard Architecture
Redis 6.2 Cluster Architecture
Redis 5.0 Standard Architecture
Redis 5.0 Cluster Architecture
Redis 4.0 Standard Architecture
Redis 4.0 Cluster Architecture
Redis 2.8 Standard Architecture
Cluster Architecture Cross-Slot Support
touch
x
-
restore
-
object
-
object help
x
x
x
x
x
-
unlink
x
x
wait
x
-
migrate
x
x
x
x
x
x
x
x
x
-
dump
-
del
scan
-
exists
expire
-
expireat
-
keys
-
type
-
move
-
ttl
-
persist
-
pexpire
-
pexpireat
-
pttl
-
randomkey
-
rename
x
renamenx
x
sort
-
sort_ro
x
x
x
x
x
x
x
-
copy
x
x
x
x
x
-
expiretime
x
x
x
x
x
x
x
-
pexpiretime
x
x
x
x
x
x
x
-
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback