diff --git a/provider/indexer-aws/src/main/java/org/opengroup/osdu/indexer/aws/cache/IndexCacheImpl.java b/provider/indexer-aws/src/main/java/org/opengroup/osdu/indexer/aws/cache/IndexCacheImpl.java index c28acd5c3f9d213c5658737d8d393475c85001a9..2c08033ebafb9a2b4e5f2224da2a59153bd49d8c 100644 --- a/provider/indexer-aws/src/main/java/org/opengroup/osdu/indexer/aws/cache/IndexCacheImpl.java +++ b/provider/indexer-aws/src/main/java/org/opengroup/osdu/indexer/aws/cache/IndexCacheImpl.java @@ -26,8 +26,9 @@ public class IndexCacheImpl implements IIndexCache<String, Boolean>, AutoCloseab public IndexCacheImpl(@Value("${aws.elasticache.cluster.endpoint}") final String REDIS_SEARCH_HOST, @Value("${aws.elasticache.cluster.port}") final String REDIS_SEARCH_PORT, + @Value("${aws.elasticache.cluster.key}") final String REDIS_SEARCH_KEY, @Value("${aws.elasticache.cluster.index.expiration}") final String INDEX_CACHE_EXPIRATION) { - cache = new RedisCache<>(REDIS_SEARCH_HOST, Integer.parseInt(REDIS_SEARCH_PORT), + cache = new RedisCache<>(REDIS_SEARCH_HOST, Integer.parseInt(REDIS_SEARCH_PORT), REDIS_SEARCH_KEY, Integer.parseInt(INDEX_CACHE_EXPIRATION) * 60, String.class, Boolean.class); } diff --git a/provider/indexer-aws/src/main/java/org/opengroup/osdu/indexer/aws/cache/SchemaCacheImpl.java b/provider/indexer-aws/src/main/java/org/opengroup/osdu/indexer/aws/cache/SchemaCacheImpl.java index e0a713737ccb356313ff9d5edf43ebeac6fda331..5b8b8f02e12ed3d5f43170721d53a282d1283b94 100644 --- a/provider/indexer-aws/src/main/java/org/opengroup/osdu/indexer/aws/cache/SchemaCacheImpl.java +++ b/provider/indexer-aws/src/main/java/org/opengroup/osdu/indexer/aws/cache/SchemaCacheImpl.java @@ -26,8 +26,9 @@ public class SchemaCacheImpl implements ISchemaCache<String, String>, AutoClosea public SchemaCacheImpl(@Value("${aws.elasticache.cluster.endpoint}") final String REDIS_SEARCH_HOST, @Value("${aws.elasticache.cluster.port}") final String REDIS_SEARCH_PORT, + @Value("${aws.elasticache.cluster.key}") final String REDIS_SEARCH_KEY, @Value("${aws.elasticache.cluster.schema.expiration}") final String SCHEMA_CACHE_EXPIRATION) { - cache = new RedisCache<>(REDIS_SEARCH_HOST, Integer.parseInt(REDIS_SEARCH_PORT), + cache = new RedisCache<>(REDIS_SEARCH_HOST, Integer.parseInt(REDIS_SEARCH_PORT), REDIS_SEARCH_KEY, Integer.parseInt(SCHEMA_CACHE_EXPIRATION) * 60, String.class, String.class); } diff --git a/provider/indexer-aws/src/main/resources/application.properties b/provider/indexer-aws/src/main/resources/application.properties index e45fcb80f9e51ca8e2513874d3d3237b5d10a21a..35404a77fa73afa85035cc0bbe89b9b42fddbce0 100644 --- a/provider/indexer-aws/src/main/resources/application.properties +++ b/provider/indexer-aws/src/main/resources/application.properties @@ -34,6 +34,7 @@ INDEXER_QUEUE_HOST="" ## AWS ElastiCache configuration aws.elasticache.cluster.endpoint=${CACHE_CLUSTER_ENDPOINT} aws.elasticache.cluster.port=${CACHE_CLUSTER_PORT} +aws.elasticache.cluster.key=${CACHE_CLUSTER_KEY} ## Cache Settings aws.elasticache.cluster.index.expiration=60