From f95467bc4fb39873c886ac7dca374dbba7ac61f4 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Fri, 31 Jul 2026 16:16:11 +0200 Subject: [PATCH] Improve performance by caching properties in memory --- apps/api/src/app/admin/admin.service.ts | 7 +++++-- apps/api/src/app/health/health.service.ts | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/api/src/app/admin/admin.service.ts b/apps/api/src/app/admin/admin.service.ts index 26a4e06f47..4c608e0fd2 100644 --- a/apps/api/src/app/admin/admin.service.ts +++ b/apps/api/src/app/admin/admin.service.ts @@ -107,8 +107,11 @@ export class AdminService { await this.marketDataService.deleteMany({ dataSource, symbol }); const currency = getCurrencyFromSymbol(symbol); - const customCurrencies = - await this.propertyService.getByKey(PROPERTY_CURRENCIES); + + const customCurrencies = await this.propertyService.getByKey( + PROPERTY_CURRENCIES, + { skipCache: true } + ); if (customCurrencies.includes(currency)) { const updatedCustomCurrencies = customCurrencies.filter( diff --git a/apps/api/src/app/health/health.service.ts b/apps/api/src/app/health/health.service.ts index f08f33a1e3..42a0be61b8 100644 --- a/apps/api/src/app/health/health.service.ts +++ b/apps/api/src/app/health/health.service.ts @@ -26,7 +26,9 @@ export class HealthService { public async isDatabaseHealthy() { try { - await this.propertyService.getByKey(PROPERTY_CURRENCIES); + await this.propertyService.getByKey(PROPERTY_CURRENCIES, { + skipCache: true + }); return true; } catch {