From 99962b75380e7d373753a3a5a45f47ac4f9d5379 Mon Sep 17 00:00:00 2001 From: Lukas Connolly Date: Wed, 21 Aug 2024 22:49:33 +0200 Subject: [PATCH] REFACTOR: NAV-131 - Flatten getCacheKEyForStopTimes. --- .../java/ch/naviqore/raptor/router/StopTimeProvider.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/ch/naviqore/raptor/router/StopTimeProvider.java b/src/main/java/ch/naviqore/raptor/router/StopTimeProvider.java index ad247f58..468e91b3 100644 --- a/src/main/java/ch/naviqore/raptor/router/StopTimeProvider.java +++ b/src/main/java/ch/naviqore/raptor/router/StopTimeProvider.java @@ -55,10 +55,9 @@ int[] getStopTimesForDate(LocalDate date, QueryConfig queryConfig) { } private String getCacheKeyForStopTimes(LocalDate date, QueryConfig queryConfig) { - String serviceId = tripMaskProvider.getServiceIdForDate(date); - String queryConfigKey = String.format("%b-%b-%s", queryConfig.isWheelchairAccessible(), - queryConfig.isBikeAccessible(), queryConfig.getAllowedTravelModes()); - return serviceId + "-" + queryConfigKey; + return String.format("%s-%b-%b-%s", tripMaskProvider.getServiceIdForDate(date), + queryConfig.isWheelchairAccessible(), queryConfig.isBikeAccessible(), + queryConfig.getAllowedTravelModes()); } private int[] createStopTimesForDate(LocalDate date, QueryConfig queryConfig) {