From 4e6683d51c4a2c8886f238981616e1a0510aa165 Mon Sep 17 00:00:00 2001 From: Jared Wray Date: Wed, 8 Jan 2025 12:07:27 -0800 Subject: [PATCH] cacheable - fix: if layer 2 has item then use expires or set to undefined cacheable - fix: if layer 2 has item then use expires or set to undefined --- packages/cacheable/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cacheable/src/index.ts b/packages/cacheable/src/index.ts index 7e048187..8d127e0e 100644 --- a/packages/cacheable/src/index.ts +++ b/packages/cacheable/src/index.ts @@ -273,7 +273,7 @@ export class Cacheable extends Hookified { const rawResult = await this._secondary.get(key, {raw: true}); if (rawResult) { result = rawResult.value as T; - const finalTtl = rawResult.expires ?? shorthandToMilliseconds(this._ttl); + const finalTtl = rawResult.expires ?? undefined; await this._primary.set(key, result, finalTtl); } }