cc30dc0713
Previously, the SW was only able to clean up caches for app-versions found in the `Driver`'s `versions` map. If (for some reason) the `Driver` failed to load a valid stored state (including app-versions) and ended up with an [empty `versions` map][1], any obsolete versions would remain in the cache storage. This case was rare but possible. This commit makes the cache clean-up logic more robust by ensuring that all app-version caches are removed unless they are currently used by the SW to serve active clients (with the exception of the latest app-version, which is always retained). Fixes #41728 [1]: https://github.com/angular/angular/blob/9de65dbdceac3077881fbc49717f33d0f379e21d/packages/service-worker/worker/src/driver.ts#L515-L529 PR Close #42622
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in Angular documentation.
License: MIT