summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/reset.md
blob: d3811988ba66aa2132f0fc80d4c34d134b50e399 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
This command performs a full reset of the connection's server-side context,
mimicking the effect of disconnecting and reconnecting again.

When the command is called from a regular client connection, it does the
following:

- Discards the current `MULTI` transaction block, if one exists.
- Unwatches all keys `WATCH`ed by the connection.
- Disables `CLIENT TRACKING`, if in use.
- Sets the connection to `READWRITE` mode.
- Cancels the connection's `ASKING` mode, if previously set.
- Sets `CLIENT REPLY` to `ON`.
- Sets the protocol version to RESP2.
- `SELECT`s database 0.
- Exits `MONITOR` mode, when applicable.
- Aborts Pub/Sub's subscription state (`SUBSCRIBE` and `PSUBSCRIBE`), when
  appropriate.
- Deauthenticates the connection, requiring a call `AUTH` to reauthenticate when
  authentication is enabled.

@return

@simple-string-reply: always 'RESET'.