Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

RESET

Last updated
RESET
Group
Connection
Complexity
O(1)
Arity
1 (exactly, counting the command name)
Flags
fast, no-auth, loading, stale
HotKV Cloud
All plans
On-Premise
no license needed

RESET clears what a connection has set up, without closing it. Connection pools use it before handing a connection to the next user. It can be sent at any time, including before authentication and inside a transaction.

After RESET the connection:

  • has no open transaction (queued commands are discarded) and watches no keys
  • is unsubscribed from every channel, pattern and shard channel
  • no longer receives MONITOR output
  • uses RESP2 and has no name
  • uses database 0
  • has READONLY, ASKING and CLIENT NO-EVICT turned off
  • has client-side caching tracking turned off
  • is the default user, logged in only if that user needs no password

Simple string RESET in RESP2 and RESP3.

127.0.0.1:6379> SELECT 2
OK
127.0.0.1:6379[2]> MULTI
OK
127.0.0.1:6379[2](TX)> SET k v
QUEUED
127.0.0.1:6379[2](TX)> RESET
RESET
127.0.0.1:6379> EXISTS k
(integer) 0

In HotKV Cloud, the CLI tab of the panel does not run RESET. Send it from your own client connection.

Same reply as Redis 7 and Valkey 8. Unlike Redis, RESET leaves the CLIENT NO-TOUCH and CLIENT REPLY settings as they were. It does turn off client-side caching tracking (see CLIENT TRACKING).

AUTH, HELLO, DISCARD, UNWATCH, SELECT