ВопросSeniorАльфа-Банк14 просмотров

Вопрос 7. Есть сервис ExampleService (см. рис). Если внешний сервис вызывает подряд методы: exampleService.getCityFromCache(100000); exampleService.getCity(100000); Сколько раз будет обращение к CityDao::getCity если кэш был пустым? @Component @RequiredArgsConstructor public class ExampleService { private final CityDao dao; @Cacheable public String getCityFromCache(int index) { return dao.getCity(index); } public String getCity(int index) { return getCityFromCache(index); } }