Revert "change caching and repository api to include system id initializer"

This reverts commit e7e915a8b1.
This commit is contained in:
2025-01-07 20:07:05 -08:00
parent e7e915a8b1
commit f442c6b279
2 changed files with 26 additions and 25 deletions

View File

@@ -8,11 +8,11 @@ export interface ApiBasedRepositoryCache {
etasForStopId?: {
[stopId: string]: IEta[],
},
stopsByStopId?: {
[stopId: string]: IStop,
stopsBySystemId?: {
[systemId: string]: IStop[],
},
shuttleByShuttleId?: {
[shuttleId: string]: IShuttle,
shuttlesByShuttleId?: {
[shuttleId: string]: IShuttle[],
},
// To speed things up, implement caches for other data later
}
@@ -34,7 +34,6 @@ const defaultTtls: ApiBasedRepositoryMillisecondTTLs = {
export class ApiBasedRepository implements GetterRepository {
constructor(
private systemId: string,
private initialCache: ApiBasedRepositoryCache | undefined = emptyCache,
private ttls: ApiBasedRepositoryMillisecondTTLs = defaultTtls,
) {