Service Worker Cache polyfill extracted from https://jakearchibald.github.io/trained-to-thrill/