function networkFetch(event, cache) {
    var request = event.request;
	return fetch(request).then(function (networkResponse) {
		if (cache) {
            cache.put(request, networkResponse.clone());
            console.log("[CARDS CACHE] " + request.url + " revalidated - broadcast to card");

            postMessage(event, {
                type: "ui-integration-card-update",
                url: request.url
            });
		}
		return networkResponse;
	});
}
//network response put in cache if given
network response put in cache if given
network response put in cache if given
function networkFetch(event, cache) {
    var request = event.request;
	return fetch(request).then(function (networkResponse) {
		if (cache) {
            cache.put(request, networkResponse.clone());
            console.log("[CARDS CACHE] " + request.url + " revalidated - broadcast to card");
            postMessage(event, {
                type: "ui-integration-card-update",
                url: request.url
            });
		}
		return networkResponse;
	});
}
function networkFetch ( event , cache ) { var request = event . request ; return fetch ( request ) . then ( function ( networkResponse ) { if ( cache ) { cache . put ( request , networkResponse . clone ( ) ) ; console . log ( "[CARDS CACHE] " + request . url + " revalidated - broadcast to card" ) ; postMessage ( event , { type : "ui-integration-card-update" , url : request . url } ) ; } return networkResponse ; } ) ; }
network response put in cache if given
network response put in cache if given