From: Plummer, Brittany Date: Wed, 24 Jun 2020 14:55:14 +0000 (-0400) Subject: Set default cache X-Git-Tag: 1.7.1~94^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=aa0a0fb26c5d7a9a50b7b2983e3f9098f1e15641;p=so.git Set default cache Set as default cache in case there are multiple options Issue-ID: SO-3006 Signed-off-by: Benjamin, Max (mb388a) Change-Id: I9d448eee56dec61be4146108dec246633b7cede2 --- diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/NovaCacheConfig.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/NovaCacheConfig.java index 2f7d19ff1d..cc79e615f1 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/NovaCacheConfig.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/NovaCacheConfig.java @@ -24,12 +24,14 @@ import org.springframework.cache.CacheManager; import org.springframework.cache.caffeine.CaffeineCacheManager; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; import com.github.benmanes.caffeine.cache.Caffeine; @Configuration public class NovaCacheConfig { @Bean + @Primary public CacheManager cacheManager() { CaffeineCacheManager cacheManager = new CaffeineCacheManager("novaClient"); cacheManager.setCaffeine(caffeineCacheBuilder());