getUri method

Future<String> getUri(
  1. Uri url, {
  2. bool readCache = true,
  3. bool writeCache = true,
  4. Duration? ttl,
})

Implementation

Future<String> getUri(
  Uri url, {
  bool readCache = true,
  bool writeCache = true,
  Duration? ttl,
}) async {
  ttl ??= Duration(days: 4);
  final cachedResp = getCache('$url');
  if (cachedResp != null) return cachedResp;
  return _finishRequest(await _client.getUrl(url), '$url', writeCache, ttl);
}