diff --git a/src/repositories/ApiBasedRepository.ts b/src/repositories/ApiBasedRepository.ts index 4c9a1c0..375b6c4 100644 --- a/src/repositories/ApiBasedRepository.ts +++ b/src/repositories/ApiBasedRepository.ts @@ -14,6 +14,19 @@ interface ApiBasedRepositoryCache { } export class ApiBasedRepository implements GetterRepository { + private cache: ApiBasedRepositoryCache; + + constructor(initialCache: ApiBasedRepositoryCache | undefined = undefined) { + if (initialCache) { + this.cache = initialCache; + } else { + this.cache = { + etasForShuttleId: {}, + etasForStopId: {}, + } + } + } + public async getEtaForShuttleAndStopId(shuttleId: string, stopId: string): Promise { return null; }