فهرست منبع

config cache expiration

Michael Wang 5 سال پیش
والد
کامیت
58bf42b03a
1فایلهای تغییر یافته به همراه15 افزوده شده و 2 حذف شده
  1. 15 2
      vue.config.js

+ 15 - 2
vue.config.js

@@ -145,7 +145,6 @@ module.exports = {
           },
         },
         {
-          // Match any same-origin request that contains 'api'.
           // 客观分10分钟更新一次
           urlPattern: /\/api\/ecs_oe_student\/examScore\/queryObjectiveScoreList\?examStudentId=/,
           handler: "cacheFirst",
@@ -155,7 +154,21 @@ module.exports = {
             },
             cacheName: "objective-score-list-cache",
             expiration: {
-              maxAgeSeconds: 10 * 60,
+              maxAgeSeconds: 5 * 60,
+            },
+          },
+        },
+        {
+          // 客观分10分钟更新一次
+          urlPattern: /\/api\/ecs_core\/systemProperty\/APP_DOWNLOAD_URL/,
+          handler: "cacheFirst",
+          options: {
+            cacheableResponse: {
+              statuses: [0, 200],
+            },
+            cacheName: "app-download-url-cache",
+            expiration: {
+              maxAgeSeconds: 2 * 60,
             },
           },
         },