add fields for cache and ttls

This commit is contained in:
2025-01-07 20:56:06 -08:00
parent ae20bb9bb9
commit 9a80bde10e

View File

@@ -14,6 +14,9 @@ export interface ApiBasedRepositoryCache {
shuttleByShuttleId?: {
[shuttleId: string]: IShuttle,
},
shuttlesBySystemId?: {
[systemId: string]: IShuttle[],
},
// To speed things up, implement caches for other data later
}
@@ -21,6 +24,7 @@ export interface ApiBasedRepositoryMillisecondTTLs {
etasForShuttleId?: number,
etasForStopId?: number,
shuttleByShuttleId?: number,
shuttlesBySystemId?: number,
}
const emptyCache: ApiBasedRepositoryCache = {