Skip to content

Commit 7f2881e

Browse files
committed
Add documentation for RESP and unstableResp3 options
1 parent 8a0f6de commit 7f2881e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

packages/client/lib/RESP/types.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,17 @@ export interface CommanderConfig<
314314
functions?: F;
315315
scripts?: S;
316316
/**
317-
* TODO
317+
* Specifies the Redis Serialization Protocol version to use.
318+
* RESP2 is the default (value 2), while RESP3 (value 3) provides
319+
* additional data types and features introduced in Redis 6.0.
318320
*/
319321
RESP?: RESP;
320322
/**
321-
* TODO
323+
* When set to true, enables commands that have unstable RESP3 implementations.
324+
* When using RESP3 protocol, commands marked as having unstable RESP3 support
325+
* will throw an error unless this flag is explicitly set to true.
326+
* This primarily affects modules like Redis Search where response formats
327+
* in RESP3 mode may change in future versions.
322328
*/
323329
unstableResp3?: boolean;
324330
}

packages/client/lib/client/commands-queue.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export default class RedisCommandsQueue {
109109
return new Decoder({
110110
onReply: reply => this.#onReply(reply),
111111
onErrorReply: err => this.#onErrorReply(err),
112+
//TODO: we can shave off a few cycles by not adding onPush handler at all if CSC is not used
112113
onPush: push => {
113114
if (!this.#onPush(push)) {
114115
// currently only supporting "invalidate" over RESP3 push messages

0 commit comments

Comments
 (0)