From 840b511e8d03b131b233028188d58abb418286ea Mon Sep 17 00:00:00 2001 From: Tomer Horowitz Date: Thu, 28 Nov 2024 12:07:03 +0200 Subject: [PATCH] fix: include namespace in cache key generation for cachedFunction --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index fedebe4..79f70dc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -125,7 +125,7 @@ export function cachedFunction(function_: F, option }; } - const cacheKey = selectorToCacheKey(arguments_, cacheOptions.selector!); + const cacheKey = selectorToCacheKey(arguments_, cacheOptions.selector!, cacheOptions.namespace); const cache = await getOrInitializeCache(options as CachedFunctionInitializerOptions); logger.trace({cacheKey}, 'Checking cache');