Skip to content

Commit

Permalink
REFACTOR: NAV-131 - Flatten getCacheKEyForStopTimes.
Browse files Browse the repository at this point in the history
  • Loading branch information
clukas1 committed Aug 21, 2024
1 parent d7c1475 commit 99962b7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/java/ch/naviqore/raptor/router/StopTimeProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 99962b7

Please sign in to comment.