Skip to content
Snippets Groups Projects
Commit 050b2517 authored by Zhibin Mai's avatar Zhibin Mai
Browse files

Set the Redis Cache as primary component

parent 684c6304
No related branches found
No related tags found
1 merge request!572Implement Redis cache in Azure for two kinds of object caches that are...
Pipeline #197008 failed
......@@ -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,
......
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment