v8 / v8.dev

The source code of v8.dev, the official website of the V8 project.
https://v8.dev/
Apache License 2.0
953 stars 320 forks source link

Fix local cache taking 1y to expire #738

Closed o- closed 8 months ago

o- commented 8 months ago

The serviceworker config in the generated sw.js contains the revision of cached pages. Client-side these revisions are used by Workbox to invalidate the local cache. The local cache strategy is precacheAndRoute. As long as sw.js is not refreshed the local cache is not invalidated and stale pages are served indefinetly.

The current policy for sw.js was 1 year, which probably was a bug, since there is also a shadowed no-cache config.