MCPcopy
hub / github.com/redis/node-redis / #addKey

Method #addKey

packages/client/lib/client/parser.ts:130–134  ·  view source on GitHub ↗

* Registers a key as both a routing key (`keys`) and a wire argument (`redisArgs`), * prepending `keyPrefix` when `applyPrefix` is true.

(key: RedisArgument, applyPrefix: boolean)

Source from the content-addressed store, hash-verified

128 * prepending `keyPrefix` when `applyPrefix` is true.
129 */
130 #addKey(key: RedisArgument, applyPrefix: boolean) {
131 const finalKey = applyPrefix ? prefixKey(this.#keyPrefix, key) : key;
132 this.#keys.push(finalKey);
133 this.#redisArgs.push(finalKey);
134 }
135
136 pushKey(key: RedisArgument, applyPrefix = true) {
137 this.#addKey(key, applyPrefix);

Callers 2

pushKeyMethod · 0.95
pushKeysMethod · 0.95

Calls 2

prefixKeyFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected