0

是否可以在 ngsw-config.json 文件上执行多个 dataGroups 以运行不同的 cacheConfigs ?例如

"dataGroups": [
    {
        "name": "random.org",
        "urls": ["https://www.random.org/**"],
        "cacheConfig": {
            "maxSize": 3,
            "maxAge": "7d",
            "strategy": "freshness"
        }
    },
"dataGroups2": [
    {
        "name": "random.org",
        "urls": ["https://www.random2.org/**"],
        "cacheConfig": {
            "maxSize": 4,
            "maxAge": "2d",
            "strategy": "freshness"
        }
    }
 ]

]

如果没有,代码中有办法做到这一点吗?

4

0 回答 0