Commit 33f1cc16 authored by Bill Wang's avatar Bill Wang
Browse files

update

parent acb3668f
......@@ -62,8 +62,9 @@ public class CursorCacheImpl implements CursorCache {
if (provider.getLocalMode()){
if (Boolean.parseBoolean(System.getenv("DISABLE_CACHE"))){
cache = new DummyCache();
}else {
this.cache = new VmCache<>(expTimeSeconds, 10);
}
this.cache = new VmCache<>(expTimeSeconds, 10);
}else {
String host = provider.getParameterAsStringOrDefault("CACHE_CLUSTER_ENDPOINT", REDIS_SEARCH_HOST);
int port = Integer.parseInt(provider.getParameterAsStringOrDefault("CACHE_CLUSTER_PORT", REDIS_SEARCH_PORT));
......
......@@ -52,8 +52,10 @@ public class FieldTypeMappingCacheImpl implements IFieldTypeMappingCache {
if (Boolean.parseBoolean(System.getenv("DISABLE_CACHE"))){
cache = new DummyCache();
}else{
this.cache = new VmCache<>(expTimeSeconds, 10);
}
this.cache = new VmCache<>(expTimeSeconds, 10);
}else {
String host = provider.getParameterAsStringOrDefault("CACHE_CLUSTER_ENDPOINT", REDIS_SEARCH_HOST);
int port = Integer.parseInt(provider.getParameterAsStringOrDefault("CACHE_CLUSTER_PORT", REDIS_SEARCH_PORT));
......
......@@ -46,8 +46,9 @@ public class IndexCacheImpl implements IIndexCache<String, Boolean>, AutoCloseab
if (provider.getLocalMode()){
if (Boolean.parseBoolean(System.getenv("DISABLE_CACHE"))){
cache = new DummyCache();
}else{
this.cache = new VmCache<>(expTimeSeconds, 10);
}
this.cache = new VmCache<>(expTimeSeconds, 10);
}else {
String host = provider.getParameterAsStringOrDefault("CACHE_CLUSTER_ENDPOINT", REDIS_SEARCH_HOST);
int port = Integer.parseInt(provider.getParameterAsStringOrDefault("CACHE_CLUSTER_PORT", REDIS_SEARCH_PORT));
......
Markdown is supported
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