Skip to content
Snippets Groups Projects
Commit b1c8eb3a authored by Steve Reis's avatar Steve Reis
Browse files

fix: Issue with algorithm cache key

parent 1c83bfd8
No related branches found
No related tags found
No related merge requests found
......@@ -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 });
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment