web-dave/angular-starter-v2

Cache dynamic Content

Opened this issue · 1 comments

  • add a dynamic node to ngsw-manifest.json
  • build your app and test it

ngsw-manifest.json

  "dynamic": {
    "group": [
      {
        "name": "bookmonkey",
        "urls": {
          "http://localhost:4730/books": {
            "match": "prefix"
          }
        },
        "cache": {
          "optimizeFor": "freshness",
          "strategy": "lru",
          "maxAgeMs": 3600000,
          "maxEntries": 20,
          "networkTimeoutMs": 1000
        }
      }
    ]
  }