Browse Source

注释极端情况

Michael Wang 4 years ago
parent
commit
1277858e1c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/utils/utils.ts

+ 2 - 1
src/utils/utils.ts

@@ -104,11 +104,12 @@ function cacheFIFO() {
     const ary = [...objectUrlMap.entries()];
     const toRelease = ary.splice(0, 10);
     // 为了避免部分图片还没显示就被revoke了,这里做一个延迟revoke
+    // TODO: 此处有个瑕疵,缩略图的显示与试卷不是同时显示,是有可能被清除了的,只能让用户刷新了
     setTimeout(() => {
       for (const u of toRelease) {
         URL.revokeObjectURL(u[1]);
       }
-    }, 2 * 6 * 1000);
+    }, 5 * 60 * 1000);
     objectUrlMap = new Map(ary);
   }
 }