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