From c64ad4872256ed947ce0bfcbdb797dbd919378ee Mon Sep 17 00:00:00 2001 From: Edward Valley Date: Sun, 18 Aug 2019 15:09:00 -0400 Subject: Make session cache per protocol configurable --- src/main/java/org/traccar/BaseProtocolDecoder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/org/traccar/BaseProtocolDecoder.java b/src/main/java/org/traccar/BaseProtocolDecoder.java index c78c220aa..54a5038b6 100644 --- a/src/main/java/org/traccar/BaseProtocolDecoder.java +++ b/src/main/java/org/traccar/BaseProtocolDecoder.java @@ -149,7 +149,8 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder { public DeviceSession getDeviceSession( Channel channel, SocketAddress remoteAddress, boolean ignoreCache, String... uniqueIds) { if (channel != null && BasePipelineFactory.getHandler(channel.pipeline(), HttpRequestDecoder.class) != null - || ignoreCache || config.getBoolean("decoder.ignoreSessionCache")) { + || ignoreCache || config.getBoolean(getProtocolName() + ".decoder.ignoreSessionCache") + || config.getBoolean("decoder.ignoreSessionCache")) { long deviceId = findDeviceId(remoteAddress, uniqueIds); if (deviceId != 0) { if (connectionManager != null) { -- cgit v1.2.3 From 84d275c1bffadd06d2941b346bc4619b7654d652 Mon Sep 17 00:00:00 2001 From: Edward Valley Date: Tue, 20 Aug 2019 03:50:00 -0400 Subject: Make config key shorter --- src/main/java/org/traccar/BaseProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/org/traccar/BaseProtocolDecoder.java b/src/main/java/org/traccar/BaseProtocolDecoder.java index 54a5038b6..e6e02c2d6 100644 --- a/src/main/java/org/traccar/BaseProtocolDecoder.java +++ b/src/main/java/org/traccar/BaseProtocolDecoder.java @@ -149,7 +149,7 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder { public DeviceSession getDeviceSession( Channel channel, SocketAddress remoteAddress, boolean ignoreCache, String... uniqueIds) { if (channel != null && BasePipelineFactory.getHandler(channel.pipeline(), HttpRequestDecoder.class) != null - || ignoreCache || config.getBoolean(getProtocolName() + ".decoder.ignoreSessionCache") + || ignoreCache || config.getBoolean(getProtocolName() + ".ignoreSessionCache") || config.getBoolean("decoder.ignoreSessionCache")) { long deviceId = findDeviceId(remoteAddress, uniqueIds); if (deviceId != 0) { -- cgit v1.2.3