- From: Domenic Denicola <notifications@github.com>
- Date: Wed, 04 Jan 2017 07:51:06 -0800
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 4 January 2017 15:51:43 UTC
domenic commented on this pull request. > + const networkFetchPromise = fetch(e.request); + + // Ignore network fetch or caching errors; they just mean we won't be able to refresh the cache. + networkFetchPromise + .then(res => refreshCacheFromNetworkResponse(e.request, res)) + .catch(() => {}); + + return cachedResponse || networkFetchPromise; + }) + ); + } +}; + +self.onactivate = e => { + e.waitUntil(caches.keys().then(keys => { + return Promise.all(keys.filter(key => key !== cacheKey).map(key => caches.delete(key))); Yep :) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/pull/637
Received on Wednesday, 4 January 2017 15:51:43 UTC