|
@@ -81,12 +81,11 @@ module.exports = {
|
|
|
clientsClaim: true,
|
|
|
runtimeCaching: [
|
|
|
{
|
|
|
- // Match any same-origin request that contains 'api'.
|
|
|
+ // 背景图如果要换,就改地址,减少网络消耗
|
|
|
urlPattern: new RegExp(
|
|
|
"^https://cdn.qmth.com.cn/ui/ecs-client-bg.jpg!/progressive/true"
|
|
|
),
|
|
|
- // Apply a network-first strategy.
|
|
|
- handler: "staleWhileRevalidate",
|
|
|
+ handler: "cacheFirst",
|
|
|
options: {
|
|
|
cacheableResponse: {
|
|
|
statuses: [0, 200],
|
|
@@ -95,20 +94,17 @@ module.exports = {
|
|
|
},
|
|
|
{
|
|
|
// Match any same-origin request that contains 'api'.
|
|
|
+ // logo 可能每次都有更新
|
|
|
urlPattern: /\/api\/ecs_core\/org\/propertyNoSession\/OE_STUDENT_SYS_NAME\?domainName=/,
|
|
|
- // Apply a network-first strategy.
|
|
|
handler: "staleWhileRevalidate",
|
|
|
},
|
|
|
{
|
|
|
// Match any same-origin request that contains 'api'.
|
|
|
urlPattern: /\/api\/ecs_core\/org\/logo\?domain=/,
|
|
|
- // Apply a network-first strategy.
|
|
|
handler: "staleWhileRevalidate",
|
|
|
},
|
|
|
{
|
|
|
- // Match any same-origin request that contains 'api'.
|
|
|
urlPattern: /\/models\/.*\.json/,
|
|
|
- // Apply a network-first strategy.
|
|
|
handler: "cacheFirst",
|
|
|
options: {
|
|
|
cacheableResponse: {
|