|
|
@@ -30,14 +30,15 @@ public class CacheConfig {
|
|
|
CaffeineCache stockInfo = build("stockInfo", FIVE_MINUTES);
|
|
|
CaffeineCache stockHistory = build("stockHistory", FIVE_MINUTES);
|
|
|
CaffeineCache portfolioHistory = build("portfolioHistory", SIX_HOURS, 100);
|
|
|
+ CaffeineCache current = build("current", FIVE_MINUTES);
|
|
|
|
|
|
SimpleCacheManager manager = new SimpleCacheManager();
|
|
|
- manager.setCaches(List.of(exchangeRates, allStockQuotes, stockQuotesQuery, stockQuotes, stockInfo, stockHistory, portfolioHistory));
|
|
|
+ manager.setCaches(List.of(exchangeRates, allStockQuotes, stockQuotesQuery, stockQuotes, stockInfo, stockHistory, portfolioHistory, current));
|
|
|
return manager;
|
|
|
}
|
|
|
|
|
|
private CaffeineCache build(String name, Duration duration) {
|
|
|
- return build(name, duration, 500);
|
|
|
+ return build(name, duration, 1000);
|
|
|
}
|
|
|
|
|
|
private CaffeineCache build(String name, Duration duration, long size) {
|