Each named groups can choose two caching strategies
interface AssetGroup {
name: string;
installMode?: 'prefetch' | 'lazy';
updateMode?: 'prefetch' | 'lazy';
resources: {
files?: string[];
versionedFiles?: string[];
urls?: string[];
};
}
export interface DataGroup {
name: string;
urls: string[];
version?: number;
cacheConfig: {
maxSize: number;
maxAge: string;
timeout?: string;
strategy?: 'freshness' | 'performance';
};
}
# all files
"https://localhost:3002/**"
# specifies all JSON files
"https://localhost:3002/**/*.json"
# specifies only HTML files in the root
"https://localhost:3002/*.html"
# exclude all sourcemaps
"!https://localhost:3002/**/*.map"