From d15866dc20772ed31b0f4001385393459e7fad4f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 22 Mar 2023 08:56:05 +0100 Subject: [PATCH] refactor(simulator): refine LRU cache type name MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/SharedLRUCache.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/charging-station/SharedLRUCache.ts b/src/charging-station/SharedLRUCache.ts index b58dc79e..bb1c0c07 100644 --- a/src/charging-station/SharedLRUCache.ts +++ b/src/charging-station/SharedLRUCache.ts @@ -9,14 +9,14 @@ enum CacheType { chargingStationConfiguration = 'chargingStationConfiguration', } -type CacheableType = ChargingStationTemplate | ChargingStationConfiguration; +type CacheValueType = ChargingStationTemplate | ChargingStationConfiguration; export class SharedLRUCache { private static instance: SharedLRUCache | null = null; - private readonly lruCache: LRUCache; + private readonly lruCache: LRUCache; private constructor() { - this.lruCache = new LRUCache( + this.lruCache = new LRUCache( Bootstrap.getInstance().numberOfChargingStationTemplates + Bootstrap.getInstance().numberOfChargingStations ); @@ -93,11 +93,11 @@ export class SharedLRUCache { return this.lruCache.has(key); } - private get(key: string): CacheableType | undefined { + private get(key: string): CacheValueType | undefined { return this.lruCache.get(key); } - private set(key: string, value: CacheableType): void { + private set(key: string, value: CacheValueType): void { this.lruCache.set(key, value); } -- 2.34.1