diff --git a/src/main/java/eu/dnetlib/irishmonitorservice/services/CacheService.java b/src/main/java/eu/dnetlib/irishmonitorservice/services/CacheService.java index 1612929..ec02d56 100644 --- a/src/main/java/eu/dnetlib/irishmonitorservice/services/CacheService.java +++ b/src/main/java/eu/dnetlib/irishmonitorservice/services/CacheService.java @@ -44,6 +44,9 @@ public class CacheService { @Scheduled(cron = "0 0 0 * * *") // Reset cache every day at 00:00 public void clearCache() throws UnsupportedEncodingException { + this.cacheManager.getCache("funder"); + this.cacheManager.getCache("organization"); + this.cacheManager.getCache("datasource"); this.cacheManager.getCacheNames().stream() .map(this.cacheManager::getCache) .filter(Objects::nonNull) diff --git a/src/main/java/eu/dnetlib/irishmonitorservice/services/StatsToolService.java b/src/main/java/eu/dnetlib/irishmonitorservice/services/StatsToolService.java index cc9ecd5..ce8711f 100644 --- a/src/main/java/eu/dnetlib/irishmonitorservice/services/StatsToolService.java +++ b/src/main/java/eu/dnetlib/irishmonitorservice/services/StatsToolService.java @@ -30,17 +30,17 @@ public class StatsToolService { @Autowired private RestTemplate restTemplate; - @Cacheable(value = "funders") + @Cacheable(value = "funder") public List>> getFunders() throws UnsupportedEncodingException { return this.getData(this.properties.getRfo()); } - @Cacheable(value = "organizations") + @Cacheable(value = "organization") public List>> getOrganizations() throws UnsupportedEncodingException { return this.getData(this.properties.getRpo()); } - @Cacheable(value = "datasources") + @Cacheable(value = "datasource") public List>> getDataSources() throws UnsupportedEncodingException { return this.getData(this.properties.getRepository()); }