RESET
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,ASKINGand CLIENT NO-EVICT turned off - has client-side caching tracking turned off
- is the
defaultuser, logged in only if that user needs no password
Return value
Section titled “Return value”Simple string RESET in RESP2 and RESP3.
Examples
Section titled “Examples”127.0.0.1:6379> SELECT 2OK127.0.0.1:6379[2]> MULTIOK127.0.0.1:6379[2](TX)> SET k vQUEUED127.0.0.1:6379[2](TX)> RESETRESET127.0.0.1:6379> EXISTS k(integer) 0In HotKV Cloud, the CLI tab of the panel does not run RESET. Send it from
your own client connection.
Compatibility
Section titled “Compatibility”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).
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.