diff --git a/packages/redis/package.json b/packages/redis/package.json index f59076ad..870bb90a 100644 --- a/packages/redis/package.json +++ b/packages/redis/package.json @@ -1,6 +1,6 @@ { "name": "@walmartlabs/cookie-cutter-redis", - "version": "1.6.0-beta.1", + "version": "1.6.0-beta.2", "license": "Apache-2.0", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/redis/src/RedisClient.ts b/packages/redis/src/RedisClient.ts index 575600c1..52cab0d8 100644 --- a/packages/redis/src/RedisClient.ts +++ b/packages/redis/src/RedisClient.ts @@ -32,6 +32,7 @@ import { RootNodesUnavailableError, SocketClosedUnexpectedlyError, WatchError, + SetOptions, } from "redis"; import { isNullOrUndefined } from "util"; @@ -247,7 +248,8 @@ export class RedisClient implements IRedisClient, IRequireInitialization, IDispo context: SpanContext, type: string | IClassType, body: T, - key: string + key: string, + options?: SetOptions, ): Promise { const db = this.config.db; const span = this.tracer.startSpan("Redis Client putObject Call", { childOf: context }); @@ -261,7 +263,7 @@ export class RedisClient implements IRedisClient, IRequireInitialization, IDispo const buf = Buffer.from(encodedBody); const storableValue = this.config.base64Encode ? buf.toString("base64") : buf; try { - await this.client.set(key, storableValue); + await this.client.set(key, storableValue, options); this.metrics.increment(RedisClientMetrics.Set, { [MetricLabels.Type]: typeName, db, diff --git a/yarn.lock b/yarn.lock index 92f82796..dc040a3f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11615,4 +11615,4 @@ yauzl@^2.4.2: yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== \ No newline at end of file