Commit 8a3d012e authored by Yunhua Koglin's avatar Yunhua Koglin Committed by Spencer Sutton
Browse files

enable redis auth token

parent d178798c
......@@ -34,8 +34,9 @@ public class CursorCacheImpl implements CursorCache {
*/
public CursorCacheImpl(@Value("${aws.elasticache.cluster.cursor.endpoint}") final String REDIS_SEARCH_HOST,
@Value("${aws.elasticache.cluster.cursor.port}") final String REDIS_SEARCH_PORT,
@Value("${aws.elasticache.cluster.cursor.key}") final String REDIS_SEARCH_KEY,
@Value("${aws.elasticache.cluster.cursor.expiration}") final String INDEX_CACHE_EXPIRATION) {
cache = new RedisCache<String, CursorSettings>(REDIS_SEARCH_HOST, Integer.parseInt(REDIS_SEARCH_PORT),
cache = new RedisCache<String, CursorSettings>(REDIS_SEARCH_HOST, Integer.parseInt(REDIS_SEARCH_PORT), REDIS_SEARCH_KEY,
Integer.parseInt(INDEX_CACHE_EXPIRATION) * 60, String.class, CursorSettings.class);
}
......
......@@ -26,8 +26,9 @@ public class IndexCacheImpl implements IIndexCache<String, Boolean>, AutoCloseab
public IndexCacheImpl(@Value("${aws.elasticache.cluster.index.endpoint}") final String REDIS_SEARCH_HOST,
@Value("${aws.elasticache.cluster.index.port}") final String REDIS_SEARCH_PORT,
@Value("${aws.elasticache.cluster.index.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);
}
......
......@@ -23,6 +23,7 @@ server.port=${APPLICATION_PORT:8080}
## AWS ElastiCache configuration
aws.elasticache.cluster.cursor.endpoint=${CACHE_CLUSTER_ENDPOINT}
aws.elasticache.cluster.cursor.port=${CACHE_CLUSTER_PORT}
aws.elasticache.cluster.cursor.key=${CACHE_CLUSTER_KEY}
aws.elasticache.cluster.cursor.expiration=60
aws.elasticache.cluster.index.endpoint=${CACHE_CLUSTER_ENDPOINT}
aws.elasticache.cluster.index.port=${CACHE_CLUSTER_PORT}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment