docs(service-worker): add info about no network request for performance strategy (#29288)
PR Close #29288
This commit is contained in:
parent
333bfa0ffb
commit
009acd2a6c
|
@ -179,7 +179,7 @@ For example, the string `5s30u` will translate to five seconds and 30 millisecon
|
|||
|
||||
The Angular service worker can use either of two caching strategies for data resources.
|
||||
|
||||
* `performance`, the default, optimizes for responses that are as fast as possible. If a resource exists in the cache, the cached version is used. This allows for some staleness, depending on the `maxAge`, in exchange for better performance. This is suitable for resources that don't change often; for example, user avatar images.
|
||||
* `performance`, the default, optimizes for responses that are as fast as possible. If a resource exists in the cache, the cached version is used, and no network request is made. This allows for some staleness, depending on the `maxAge`, in exchange for better performance. This is suitable for resources that don't change often; for example, user avatar images.
|
||||
|
||||
* `freshness` optimizes for currency of data, preferentially fetching requested data from the network. Only if the network times out, according to `timeout`, does the request fall back to the cache. This is useful for resources that change frequently; for example, account balances.
|
||||
|
||||
|
|
Loading…
Reference in New Issue