(key: Key)
| 370 | } |
| 371 | |
| 372 | entryStats(key: Key): Effect.Effect<Option.Option<Cache.EntryStats>> { |
| 373 | return core.sync(() => { |
| 374 | const option = MutableHashMap.get(this.cacheState.map, key) |
| 375 | if (Option.isSome(option)) { |
| 376 | switch (option.value._tag) { |
| 377 | case "Complete": { |
| 378 | const loaded = option.value.entryStats.loadedMillis |
| 379 | return Option.some(makeEntryStats(loaded)) |
| 380 | } |
| 381 | case "Pending": { |
| 382 | return Option.none() |
| 383 | } |
| 384 | case "Refreshing": { |
| 385 | const loaded = option.value.complete.entryStats.loadedMillis |
| 386 | return Option.some(makeEntryStats(loaded)) |
| 387 | } |
| 388 | } |
| 389 | } |
| 390 | return Option.none() |
| 391 | }) |
| 392 | } |
| 393 | |
| 394 | getEither(key: Key): Effect.Effect<Either.Either<Value, Value>, Error> { |
| 395 | return core.suspend((): Effect.Effect<Either.Either<Value, Value>, Error> => { |
nothing calls this directly
no test coverage detected