fetchAndCache method
Implementation
Future<JsonApiDocument> fetchAndCache(String endpoint, String id) async {
JsonApiDocument fetched = await fetch(endpoint, id);
cache(endpoint, fetched);
return fetched;
}
Future<JsonApiDocument> fetchAndCache(String endpoint, String id) async {
JsonApiDocument fetched = await fetch(endpoint, id);
cache(endpoint, fetched);
return fetched;
}