From dcec3accf076d1c6c4a5f6a722e1213c21eb9230 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 29 Jun 2024 16:53:35 +0200 Subject: [PATCH] Feature/improve caching of benchmarks (#3530) * Improve caching * Update changelog --- CHANGELOG.md | 1 + apps/api/src/app/benchmark/benchmark.service.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ba81e46..a720c17b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added support for derived currencies in the currency validation - Added support for automatic deletion of unused asset profiles when deleting activities +- Improved the caching of the benchmarks in the markets overview (only cache if needed) ### Fixed diff --git a/apps/api/src/app/benchmark/benchmark.service.ts b/apps/api/src/app/benchmark/benchmark.service.ts index 6008746d..27d91fd7 100644 --- a/apps/api/src/app/benchmark/benchmark.service.ts +++ b/apps/api/src/app/benchmark/benchmark.service.ts @@ -135,7 +135,7 @@ export class BenchmarkService { Promise.all(promisesAllTimeHighs), Promise.all(promisesBenchmarkTrends) ]); - let storeInCache = true; + let storeInCache = useCache; benchmarks = allTimeHighs.map((allTimeHigh, index) => { const { marketPrice } =