CachedCall<T>.direct constructor

CachedCall<T>.direct(
  1. Future<T> fetch()
)

A call with no cache: every strategy asks fetch and emits its answer as the server's.

Implementation

factory CachedCall.direct(Future<T> Function() fetch) =>
    CachedCall((_) async* {
      yield Cached(await fetch(), source: CacheSource.server);
    });