PWAにおけるキャッシュの更新方法

https://blog.htmlhifive.com/2018/08/27/pwa-cache-update/
registration.onupdatefound に registration.update(); を仕込んでおく。

navigator.serviceWorker.register('/serviceworker.js')
.then(registration => {
registration.onupdatefound = function() {
console.log('アップデートがあります!');
registration.update();
}
});