From 7595530490be42cf6548ebb69a6d840512647296 Mon Sep 17 00:00:00 2001 From: SmartRootsSrl Date: Thu, 26 Mar 2026 12:46:18 +0100 Subject: [PATCH] feat: propagate showNatixis through orchestrator and cache keys Co-Authored-By: Claude Sonnet 4.6 --- .../Services/Implementations/ReportOrchestrator.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CertReports.Syncfusion/Services/Implementations/ReportOrchestrator.cs b/CertReports.Syncfusion/Services/Implementations/ReportOrchestrator.cs index 1dcd9d2..b31da41 100644 --- a/CertReports.Syncfusion/Services/Implementations/ReportOrchestrator.cs +++ b/CertReports.Syncfusion/Services/Implementations/ReportOrchestrator.cs @@ -44,12 +44,17 @@ public class ReportOrchestrator : IReportOrchestrator _dividendRenderer = dividendRenderer; } - public async Task GenerateReportAsync(string isin, bool showBranding = false, bool showDividend = false) + public async Task GenerateReportAsync(string isin, bool showBranding = false, bool showDividend = false, bool showNatixis = false) { // ── Cache check ──────────────────────────────────────────────── var dividendSuffix = showDividend ? ":dividend" : ""; - var baseCacheKey = showBranding ? $"{isin}:branded{dividendSuffix}" : $"{isin}{dividendSuffix}"; - var expiredCacheKey = showBranding ? $"{isin}:expired:branded{dividendSuffix}" : $"{isin}:expired{dividendSuffix}"; + var natixisSuffix = showNatixis ? ":natixis" : ""; + var baseCacheKey = showBranding + ? $"{isin}:branded{dividendSuffix}{natixisSuffix}" + : $"{isin}{dividendSuffix}{natixisSuffix}"; + var expiredCacheKey = showBranding + ? $"{isin}:expired:branded{dividendSuffix}{natixisSuffix}" + : $"{isin}:expired{dividendSuffix}{natixisSuffix}"; var cached = _cache.Get(baseCacheKey) ?? _cache.Get(expiredCacheKey); if (cached != null) @@ -68,6 +73,7 @@ public class ReportOrchestrator : IReportOrchestrator Scenario = await _dataService.GetScenarioAnalysisAsync(isin), ShowBranding = showBranding, ShowDividend = showDividend, + ShowNatixis = showNatixis, }; // ── 2. Determina il tipo di report ────────────────────────────