diff --git a/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/cache/RecordChangeInfoRedisCache.java b/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/cache/RecordChangeInfoRedisCache.java index ed0097159e9a03dbfae6a3cde3f6f2445cd47fb8..0f2634719b91a5fe752266cd7a0ed674a1bfbd15 100644 --- a/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/cache/RecordChangeInfoRedisCache.java +++ b/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/cache/RecordChangeInfoRedisCache.java @@ -20,11 +20,13 @@ import org.opengroup.osdu.indexer.cache.IRecordChangeInfoCache; import org.opengroup.osdu.indexer.model.RecordChangeInfo; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.annotation.Primary; import org.springframework.stereotype.Component; import javax.inject.Named; @Component +@Primary @ConditionalOnProperty(value = "runtime.env.local", havingValue = "false", matchIfMissing = true) public class RecordChangeInfoRedisCache extends RedisCache<String, RecordChangeInfo> implements IRecordChangeInfoCache { public RecordChangeInfoRedisCache(final @Named("REDIS_HOST") String host, diff --git a/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/cache/RelatedObjectRedisCache.java b/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/cache/RelatedObjectRedisCache.java index c37f5c59a7c4ac16275b58875cfecfb28aad9cae..9e6c0b58f60c51e25f8265f9b5ac36395ad8b7ee 100644 --- a/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/cache/RelatedObjectRedisCache.java +++ b/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/cache/RelatedObjectRedisCache.java @@ -20,11 +20,13 @@ import org.opengroup.osdu.core.common.model.storage.RecordData; import org.opengroup.osdu.indexer.cache.IRelatedObjectCache; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.annotation.Primary; import org.springframework.stereotype.Component; import javax.inject.Named; @Component +@Primary @ConditionalOnProperty(value = "runtime.env.local", havingValue = "false", matchIfMissing = true) public class RelatedObjectRedisCache extends RedisCache<String, RecordData> implements IRelatedObjectCache { public RelatedObjectRedisCache(final @Named("REDIS_HOST") String host,