feat(service-worker): include CacheQueryOptions
options in ngsw-config (#34663)
Previously it was not possible to provide `CacheQueryOptions` ([MDN](https://developer.mozilla.org/en-US/docs/Web/API/Cache)) for querying the Cache. This commit introduces a new parameter called `cacheQueryOptions` for `DataGroup` and `AssetGroup`. Currently only `ignoreSearch` is supported as `ignoreVary` and `ignoreMethod` would require using the complete Request object for matching which is not possible with the current implementation. Closes #28443 PR Close #34663
This commit is contained in:

committed by
Alex Rickabaugh

parent
49be32c931
commit
dc9f4b994e
@ -1,4 +1,5 @@
|
||||
export declare interface AssetGroup {
|
||||
cacheQueryOptions?: Pick<CacheQueryOptions, 'ignoreSearch'>;
|
||||
installMode?: 'prefetch' | 'lazy';
|
||||
name: string;
|
||||
resources: {
|
||||
@ -23,6 +24,7 @@ export declare interface DataGroup {
|
||||
timeout?: Duration;
|
||||
strategy?: 'freshness' | 'performance';
|
||||
};
|
||||
cacheQueryOptions?: Pick<CacheQueryOptions, 'ignoreSearch'>;
|
||||
name: string;
|
||||
urls: Glob[];
|
||||
version?: number;
|
||||
|
Reference in New Issue
Block a user