From b1c8eb3a03911f9447b9d04c173b41bce932e29b Mon Sep 17 00:00:00 2001 From: Steve Reis <stevereis93@gmail.com> Date: Fri, 26 Aug 2022 10:52:10 +0200 Subject: [PATCH] fix: Issue with algorithm cache key --- api/src/engine/engine.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/src/engine/engine.service.ts b/api/src/engine/engine.service.ts index 35b3cc3..c966152 100644 --- a/api/src/engine/engine.service.ts +++ b/api/src/engine/engine.service.ts @@ -32,7 +32,7 @@ import { FormulaOperation } from './models/formula/formula-operation.model'; import { Variable } from './models/variable.model'; const DOMAINS_CACHE_KEY = 'domains'; -const ALGORITHMS_CACHE_KEY = 'experiments'; +const ALGORITHMS_CACHE_KEY = 'algorithms'; const CACHE_KEYS = [DOMAINS_CACHE_KEY, ALGORITHMS_CACHE_KEY]; /** @@ -99,6 +99,8 @@ export default class EngineService implements Connector { const cached = await this.cacheManager.get<T>(key); if (cached) return cached; + console.log(`Cache for ${key} not found. Calling function.`); + const result = await fn(); this.cacheManager.set(key, result, { ttl: this.cacheConf.ttl }); -- GitLab