mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
add cache initialization
This commit is contained in:
@@ -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<IEta | null> {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user