Skip to content
Permalink
Browse files

Merge branch '3.9' of https://github.com/JumpMind/symmetric-ds.git in…

…to 3.9
  • Loading branch information...
chenson42 committed Jul 11, 2018
2 parents 698d7e5 + 48139ad commit 708867f2c3d505faad65e44648d10faf959b16c6
@@ -389,13 +389,14 @@ public Node findIdentity(boolean useCache, boolean logSqlError) {
long cacheTimeoutInMs = parameterService.getLong(ParameterConstants.CACHE_TIMEOUT_NODE_GROUP_LINK_IN_MS);
if (node != null) {
List<Node> list = targetNodesCache.get(eventAction.name());

if (list == null || (System.currentTimeMillis() - targetNodeLinkCacheTime.get(eventAction.toString())) >= cacheTimeoutInMs) {
list = sqlTemplate.query(getSql("selectNodePrefixSql", "findNodesWhoITargetSql"),
new NodeRowMapper(), node.getNodeGroupId(), eventAction.name());
targetNodesCache.put(eventAction.name(), list);
targetNodeLinkCacheTime.put(eventAction.toString(),System.currentTimeMillis());
}
return list;
return new ArrayList<Node>(list);
} else {
return Collections.emptyList();
}

0 comments on commit 708867f

Please sign in to comment.
You can’t perform that action at this time.