From: Jérôme Benoit Date: Fri, 7 Jul 2023 20:51:14 +0000 (+0200) Subject: fix: clear idtags cache at template file change X-Git-Tag: v1.2.18~67 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e74bc54995a3758d3e3a60af3eb2bb36eb78d2e4;p=e-mobility-charging-stations-simulator.git fix: clear idtags cache at template file change Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index ba43ff98..77e93ed6 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -698,9 +698,9 @@ export class ChargingStation { } file have changed, reload` ); this.sharedLRUCache.deleteChargingStationTemplate(this.templateFileHash); - // FIXME: cleanup idtags cache if idtags file has changed // Initialize this.initialize(); + this.idTagsCache.deleteIdTags(getIdTagsFile(this.stationInfo)); // Restart the ATG this.stopAutomaticTransactionGenerator(); if (this.getAutomaticTransactionGeneratorConfiguration()?.enable === true) { @@ -984,9 +984,9 @@ export class ChargingStation { case ReservationTerminationReason.TRANSACTION_STARTED: delete connector.reservation; break; - case ReservationTerminationReason.RESERVATION_CANCELED || - ReservationTerminationReason.REPLACE_EXISTING || - ReservationTerminationReason.EXPIRED: + case ReservationTerminationReason.RESERVATION_CANCELED: + case ReservationTerminationReason.REPLACE_EXISTING: + case ReservationTerminationReason.EXPIRED: await OCPPServiceUtils.sendAndSetConnectorStatus( this, reservation.connectorId,