Skip to content
Snippets Groups Projects
Commit 3d5c13e2 authored by Zhibin Mai's avatar Zhibin Mai Committed by Chad Leong
Browse files

Set the Redis Cache as primary component

(cherry picked from commit 050b2517)
parent b7e0c7f9
Branches
Tags
1 merge request!582Cherry-pick 'Implement Redis cache in Azure for two kinds of object caches that are...' into release/0.22
......@@ -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.
Please register or to comment