angular-docs-cn/packages/service-worker
George Kalpakas f592a12005 fix(service-worker): avoid storing redundant metadata for hashed assets (#42606)
The ServiceWorker needs to keep track of some metadata for unhashed
asset resources to know if/when they might need to be revalidated. This
applies to resources that do not exist on the filesystem at build-time
(and thus cannot be hashed), such as fonts or images loaded from
external sources. For hashed resources, this metadata is irrelevant,
because the hash is enough to verify that the content hasn't changed and
no revalidation is necessary.

Previously, the ServiceWorker would store such metadata for hashed
resources as well, even though it would never be used (thus taking up
space unnecessarily).

This commit fixes it by not storing metadata for hashed resources, i.e.
those that are included in an asset-group's `hashes` array.

PR Close #42606
2021-07-08 10:27:16 -07:00
..
cli fix(service-worker): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:43 -08:00
config feat(service-worker): add the option to prefer network for navigation requests (#38565) 2020-09-22 09:29:20 -07:00
src docs(service-worker): add missing comma in example JSON data (#42606) 2021-07-08 10:27:16 -07:00
test refactor(service-worker): simplify accessing `CacheStorage` throughout the ServiceWorker (#42622) 2021-06-24 09:55:32 -07:00
testing build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
worker fix(service-worker): avoid storing redundant metadata for hashed assets (#42606) 2021-07-08 10:27:16 -07:00
BUILD.bazel build: use api-golden tool from dev-infra for testing public API (#42688) 2021-06-30 11:43:48 -07:00
PACKAGE.md docs: add package doc files (#26047) 2018-10-05 15:42:14 -07:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
package.json feat(core): support TypeScript 4.3 (#42022) 2021-06-04 11:17:09 -07:00
public_api.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
safety-worker.js build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00