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
7d015555
Commit
7d015555
authored
Jun 28, 2021
by
Spencer Sutton
Browse files
Fixing redis caching problem with field type mapping
parent
fa72c9c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
provider/search-aws/src/main/java/org/opengroup/osdu/search/provider/aws/cache/FieldTypeMappingCacheImpl.java
View file @
7d015555
...
...
@@ -15,6 +15,7 @@
package
org.opengroup.osdu.search.provider.aws.cache
;
import
org.opengroup.osdu.core.common.cache.RedisCache
;
import
org.opengroup.osdu.core.common.model.search.CursorSettings
;
import
org.opengroup.osdu.search.cache.IFieldTypeMappingCache
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
...
...
@@ -34,9 +35,11 @@ public class FieldTypeMappingCacheImpl implements IFieldTypeMappingCache {
* @param REDIS_SEARCH_PORT - the port of the Cursor Cache Redis cluster.
*/
public
FieldTypeMappingCacheImpl
(
@Value
(
"${aws.elasticache.cluster.cursor.endpoint}"
)
final
String
REDIS_SEARCH_HOST
,
@Value
(
"${aws.elasticache.cluster.cursor.port}"
)
final
String
REDIS_SEARCH_PORT
)
{
cache
=
new
RedisCache
<
String
,
Map
>(
REDIS_SEARCH_HOST
,
Integer
.
parseInt
(
REDIS_SEARCH_PORT
),
5
*
60
,
String
.
class
,
Map
.
class
);
@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
,
Map
>(
REDIS_SEARCH_HOST
,
Integer
.
parseInt
(
REDIS_SEARCH_PORT
),
REDIS_SEARCH_KEY
,
Integer
.
parseInt
(
INDEX_CACHE_EXPIRATION
)
*
60
,
String
.
class
,
Map
.
class
);
}
/**
...
...
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