(options: FileLearnSessionCacheStoreOptions)
| 48 | private readonly now: () => number; |
| 49 | |
| 50 | constructor(options: FileLearnSessionCacheStoreOptions) { |
| 51 | this.cacheFilePath = options.cacheFilePath ?? getDefaultCacheFilePath(); |
| 52 | this.ttlMs = options.ttlMs ?? DEFAULT_CACHE_TTL_MS; |
| 53 | this.now = options.now ?? Date.now; |
| 54 | } |
| 55 | |
| 56 | async read(endpoint: string): Promise<LearnSessionCacheValue | undefined> { |
| 57 | const normalizedEndpoint = normalizeEndpoint(endpoint); |
nothing calls this directly
no test coverage detected