import LRUCache from 'mnemonist/lru-map-with-delete';
+import { Bootstrap } from '../internal';
import type { ChargingStationConfiguration } from '../types/ChargingStationConfiguration';
import type { ChargingStationTemplate } from '../types/ChargingStationTemplate';
import Utils from '../utils/Utils';
private readonly lruCache: LRUCache<string, CacheableType>;
private constructor() {
- this.lruCache = new LRUCache<string, CacheableType>(1000);
+ this.lruCache = new LRUCache<string, CacheableType>(
+ Bootstrap.getInstance().numberOfChargingStationTemplates +
+ Bootstrap.getInstance().numberOfChargingStations
+ );
}
public static getInstance(): SharedLRUCache {