瀏覽代碼

Editor: Implement cache per update

Mr.doob 4 年之前
父節點
當前提交
412b99a7f2
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      editor/sw.js

+ 2 - 2
editor/sw.js

@@ -1,4 +1,4 @@
-// r126.1
+const cacheName = 'threejs-editor-r126';
 
 
 const assets = [
 const assets = [
 	'./',
 	'./',
@@ -214,7 +214,7 @@ const assets = [
 
 
 self.addEventListener( 'install', async function () {
 self.addEventListener( 'install', async function () {
 
 
-	const cache = await caches.open( 'threejs-editor' );
+	const cache = await caches.open( cacheName );
 
 
 	assets.forEach( function ( asset ) {
 	assets.forEach( function ( asset ) {