add caching intreface

This commit is contained in:
2025-01-07 14:44:37 -08:00
parent 0f9ba4c3f0
commit 32bbbf6fdf

View File

@@ -1,8 +1,18 @@
import { GetterRepository } from "./GetterRepository";
import { IEta } from "../entities/entities";
import { IEta, IOrderedStop, IRoute } from "../entities/entities";
// TODO: implement
interface ApiBasedRepositoryCache {
etasForShuttleId: {
[shuttleId: string]: IEta[],
},
etasForStopId: {
[stopId: string]: IEta[],
},
// To speed things up, implement caches for other data later
}
export class ApiBasedRepository implements GetterRepository {
public async getEtaForShuttleAndStopId(shuttleId: string, stopId: string): Promise<IEta | null> {
return null;