mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
add cache initialization
This commit is contained in:
@@ -14,6 +14,19 @@ interface ApiBasedRepositoryCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class ApiBasedRepository implements GetterRepository {
|
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<IEta | null> {
|
public async getEtaForShuttleAndStopId(shuttleId: string, stopId: string): Promise<IEta | null> {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user