Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ public List<PriceData> fetchSharePrices(String symbol, LocalDate startDate, Loca
return repository.loadPrices(symbol, startDate, endDate);
}

List<PriceData> cached = repository.loadPrices(symbol, startDate, endDate);
if (!cached.isEmpty()) {
log.debug("Returning cached prices for symbol={} ({} to {})", symbol, startDate, endDate);
return cached;
}

String json = fetchTimeSeriesDailyJson(symbol, outputSize);
if (json == null) {
return repository.loadPrices(symbol, startDate, endDate);
Expand Down