feat: propagate showNatixis through orchestrator and cache keys
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -44,12 +44,17 @@ public class ReportOrchestrator : IReportOrchestrator
|
||||
_dividendRenderer = dividendRenderer;
|
||||
}
|
||||
|
||||
public async Task<byte[]> GenerateReportAsync(string isin, bool showBranding = false, bool showDividend = false)
|
||||
public async Task<byte[]> 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 ────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user