in Lab/Exercise2/02-End/Contoso.Dashboard/js/sb-admin.js [36:49]
async function updateOrders() {
var url = baseUrl + '/api/orders';
let cache = await caches.open('pwabuilder-offline');
let cacheResult = await cache.match(url);
if (cacheResult) {
let json = await cacheResult.json();
$('#orders').html(json.count + ' New orders!');
}
let httpResult = await fetch(url);
let jsonResult = await httpResult.json();
$('#orders').html(jsonResult.count + ' New orders!');
}