Title: Caching in service worker isn't working when path is generalized. · Issue #48714 · angular/angular · GitHub
Open Graph Title: Caching in service worker isn't working when path is generalized. · Issue #48714 · angular/angular
X Title: Caching in service worker isn't working when path is generalized. · Issue #48714 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? service-worker Is this a regression? Yes Description When I'm configuring my dataGroups for caching in ngsw-config.json, if I specify the full path, only then the caching works. Othe...
Open Graph Description: Which @angular/* package(s) are the source of the bug? service-worker Is this a regression? Yes Description When I'm configuring my dataGroups for caching in ngsw-config.json, if I specify the full...
X Description: Which @angular/* package(s) are the source of the bug? service-worker Is this a regression? Yes Description When I'm configuring my dataGroups for caching in ngsw-config.json, if I specify the ...
Opengraph URL: https://github.com/angular/angular/issues/48714
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Caching in service worker isn't working when path is generalized.","articleBody":"### Which @angular/* package(s) are the source of the bug?\r\n\r\nservice-worker\r\n\r\n### Is this a regression?\r\n\r\nYes\r\n\r\n### Description\r\n\r\n When I'm configuring my dataGroups for caching in ngsw-config.json, if I specify the full path, only then the caching works. Otherwise, It doesn't cache.\r\n\r\nThis works:\r\n`\"dataGroups\": [{\r\n \"name\": \"getRequestCache\",\r\n \"urls\": [\r\n \"myapp/ai_models\",\r\n \"myapp/ai_models/parameters\"\r\n ],\r\n \"cacheConfig\": {\r\n \"strategy\": \"freshness\",\r\n \"maxSize\": 1000,\r\n \"maxAge\": \"3d\",\r\n \"timeout\": \"10s\"\r\n }\r\n }\r\n]`\r\n\r\nThis doesn't work:\r\n`\"dataGroups\": [{\r\n \"name\": \"getRequestCache\",\r\n \"urls\": [\r\n \"/**\",\r\n \"/**/**\", \r\n \"/**/**/**\" \r\n ],\r\n \"cacheConfig\": {\r\n \"strategy\": \"freshness\",\r\n \"maxSize\": 1000,\r\n \"maxAge\": \"3d\",\r\n \"timeout\": \"10s\"\r\n }\r\n }\r\n]`\r\n\r\nIs there any way to not write each path specifically and assign a general path, so that everything gets cached?\r\n\r\n### Please provide a link to a minimal reproduction of the bug\r\n\r\n_No response_\r\n\r\n### Please provide the exception or error you saw\r\n\r\n_No response_\r\n\r\n### Please provide the environment you discovered this bug in (run `ng version`)\r\n\r\n_No response_\r\n\r\n### Anything else?\r\n\r\n_No response_","author":{"url":"https://github.com/ChayanNath","@type":"Person","name":"ChayanNath"},"datePublished":"2023-01-12T11:45:15Z","url":"https://github.com/angular/angular/issues/48714"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:04425c10-22e8-009f-5984-f841224c838c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A35A:3F4253:E461F0:130C7CE:6B01080D |
| html-safe-nonce | 3e9f31f3b953751a6aa9707aa1b1cf398e244990f6b37d793da4bf1954a8fbdd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzVBOjNGNDI1MzpFNDYxRjA6MTMwQzdDRTo2QjAxMDgwRCIsInZpc2l0b3JfaWQiOiI2MDUyMzU2NjM3MDEwNzU3NjQ1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5b7e1e51dba638c0bec7791578e13e6a5ace462cd38dc2480d04395a12ce5a27 |
| hovercard-subject-tag | issue:1530572007 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/48714/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f173dcf68d7b16673ced103d50b88185c4c9ffb0dea3f71b59cb3de64f3b771e/angular/angular/issues/48714 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f173dcf68d7b16673ced103d50b88185c4c9ffb0dea3f71b59cb3de64f3b771e/angular/angular/issues/48714 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? service-worker Is this a regression? Yes Description When I'm configuring my dataGroups for caching in ngsw-config.json, if I specify the full... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ChayanNath |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width