缓存存储的默认过期时间是多少

What's the default expiration time for cache storage

我正在使用工作箱来缓存网站的资源和资产。 我想知道这些资源有没有默认的过期时间?还是我必须设置一个?

这是我的一个缓存方法的示例

/**
 * Cache CSS
 */
workbox.routing.registerRoute(/cache\/css\/.+/,  workbox.strategies.cacheFirst({
    cacheName: 'styles',
    plugins: [
      new workbox.expiration.Plugin({
        maxEntries: 20,
      }),
    ],
}));

workbox guides 表明我可以添加自定义到期时间。

new workbox.expiration.Plugin({
  maxEntries: 50,
  maxAgeSeconds: 5 * 60, // 5 minutes
}),

我想知道我是否能找到默认的过期时间,我尝试使用 chrome 开发工具,但没有找到任何提及 缓存过期时间的内容存储.

我觉得没有默认的过期时间,如果你不自己设置的话

如果您不指定任何内容,那么当缓存已满时,它将简单地遵循浏览器的缓存逐出策略。

Offline Storage for Progressive Web Apps