Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Search
Commits
1c930f09
Commit
1c930f09
authored
Jun 15, 2021
by
Yunhua Koglin
Browse files
enable redis auth token
parent
60d1e7c9
Changes
3
Show whitespace changes
Inline
Side-by-side
provider/search-aws/src/main/java/org/opengroup/osdu/search/provider/aws/cache/CursorCacheImpl.java
View file @
1c930f09
...
...
@@ -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
);
}
...
...
provider/search-aws/src/main/java/org/opengroup/osdu/search/provider/aws/cache/IndexCacheImpl.java
View file @
1c930f09
...
...
@@ -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
);
}
...
...
provider/search-aws/src/main/resources/application.properties
View file @
1c930f09
...
...
@@ -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}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment