get method

  1. @override
Future<CacheResponse?> get(
  1. String key
)

Retrieves cached response from the given key.

Implementation

@override
Future<CacheResponse?> get(String key) async {
  final database = await _openDatabase();
  final resp = await _store.record(key).getSnapshot(database);
  return resp?.value != null ? CacheResponseExt.fromJson(resp!.value) : null;
}