已使用ExpirationPlugin的注册路由设置了Cache优先级路由,且maxAge为60,但它不起作用,始终会从缓存中获取api,并且永远不会从浏览器中退出缓存
workbox.routing.registerRoute(
new RegExp('/api/orders/businessHoursByTimeZone/*'),
new workbox.strategies.CacheFirst({
cacheName: "business-timezones-cache",
plugins: [
new workbox.expiration.ExpirationPlugin({
maxAgeSeconds: 60,
maxEntries: 2
}),
],
})
);