0

why my every request is being cached when even did't mentioned anything about whose api address to get cached, It seems like the ngsw-worker.js is not following the ngsw.json configs

image 1 => here is the first image of api which is everytime being cached from service worker even though its not inn the config file

image 2 => here is the list of apis which all got response from the service worker even without having in configs to get cached

{
"index": "/index.html",
"assetGroups": [
  {
    "name": "app",
    "installMode": "prefetch",
    "resources": {
      "files": [
        "/favicon.ico",
        "/index.html",
        "/manifest.webmanifest",
        "/*.css",
        "/*.js"
      ]
    }
  },
  {
    "name": "assets",
    "installMode": "lazy",
    "updateMode": "prefetch",
    "resources": {
      "files": [
        "/assets/**",
        "/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"
      ]
    }
  }
],
"dataGroups": [
 
  {
    "name": "api-freshness",
    "urls": [
      "/keycloak.json",
      "/api/user-config/**",
      "/applications/**",
      "/api/services"
    ],
    "cacheConfig": {
        "strategy": "freshness",
        "maxSize": 1000,
        "maxAge": "1d",
        "timeout": "1s"
    }
  }
]

}

M Fahad
  • 35
  • 7

0 Answers0